Django dev, Python 2.6.6

Just wondering if I should file a bug report or am I just doing
something wrong.

I have an inline:


class ProductImageInline(admin.StackedInline):
    model = ProductImage
    formset = ProductImageFormset


...the form declaration and formset factory call:


class ProductImageForm(forms.ModelForm):

    class Meta:
        model = ProductImage
        widgets = {
            'picture': AdminImageJCropWidget(auto_enable=True,
jcrop_options=JCROP_OPTIONS)
        }

ProductImageFormset = inlineformset_factory(Product, ProductImage,
form=ProductImageForm,
 
formset=BaseJCropImageFormset, extra=3)


The widgets declaration on the Meta class is not sticking. Bug?


However, if I add a formfield_overrides to my inline, it works:

class NewProductImageInline(admin.StackedInline):
    model = ProductImage
    formset = ProductImageFormset

    formfield_overrides = {
        models.ImageField: {'widget':
AdminImageJCropWidget(auto_enable=True, jcrop_options=JCROP_OPTIONS)},
    }


The former looks like it should work and I prefer it over the latter
method, can anyone shed some light on this for me?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to