Re: ImageField in admin always required

2012-12-16 Thread Detectedstealth
Thanks required=False is what I needed :). "ImageField is not required as expected" Isn't that what you want? :) Yes that is exactly what I wanted but also wanted to display the actual setting the required=False allows me to have my cake and eat it too :). Not sure why required vs blank,

Re: ImageField in admin always required

2012-12-12 Thread Chris Cogdon
NOTE: I tried adding null=True, blank=True to forms.ImageField however I > get errors __init__() got an unexpected keyword argument so I guess I can't > use them options. If I comment out the def formfield_for_dbfield(self, > db_field, **kwargs): then the ImageField is not required as

Re: ImageField in admin always required

2012-12-12 Thread Detectedstealth
Update: Looks like it was an issue with the admin.py file custom code, I was following a code sample to display images inline which is causing the field to become required. Any suggestions on how to fix this? (See code below) class AdminImageFieldWithThumbWidget(forms.widgets.FileInput):

ImageField in admin always required

2012-12-06 Thread Detectedstealth
Hi, I have a picture for my custom user declared as follows: class CustomUser(AbstractBaseUser): picture = models.ImageField(upload_to='profile_pictures', null=True, blank=True) In admin I use the image class CustomUserAdmin(UserAdmin): fieldsets( ('Profile details', {