Opened 19 years ago
Closed 17 years ago
#871 closed defect (worksforme)
ImageField doesn''t honor blank=True argument
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
with this code:
class File(meta.Model): file = meta.FileField(upload_to=MEDIA_ROOT, core=True) thumbnail = meta.ImageField(upload_to="/files/thumbs/", null=True, blank=True)
adding a File requires also a thumbnail.
Change History (5)
comment:1 by , 18 years ago
Summary: | ImageField doesn't honor blank=True argument → ImageField doesn''t honor blank=True argument |
---|
comment:2 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Marking as worksforme as I'm unable to replicate this. If you (or anyone else) is still having problems with this, please reopen the ticket and let us know.
comment:3 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
doesnt work for me. :-(
picture = models.ImageField(upload_to=settings.UPLOAD_TO, blank=True, null=True)
returns:
Enter a valid filename.
comment:4 by , 17 years ago
These models all work perfectly for me with [5722]. I couldn't find any circumstances where they would require the ImageField to be non-blank.
class Picture(models.Model): title = models.CharField(maxlength=40) image = models.ImageField(upload_to='images/', null=True, blank=True) class PictureB(models.Model): image = models.ImageField(upload_to='images/', null=True, blank=True) class FileWithPicture(models.Model): file = models.FileField(upload_to='files/') image = models.ImageField(upload_to='images/', null=True, blank=True) class ImageFK(models.Model): fk = models.ForeignKey(FileWithPicture, edit_inline=models.STACKED) title = models.CharField(maxlength=40, core=True) file = models.FileField(upload_to='files/') image = models.ImageField(upload_to='images/', null=True, blank=True)
comment:5 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
Closing based on John's "worksforme"
Hi all
im fine, gl all!