#10002: Data does not display in TabularInline when validation fails for an
ImageField
---------------------------------------+------------------------------------
Reporter: anonymous | Owner: nobody
Status: new | Milestone: post-1.0
Component: django.contrib.admin | Version: 1.0
Keywords: TabularInline, ImageField | Stage: Unreviewed
Has_patch: 0 |
---------------------------------------+------------------------------------
I have a TabularInline form associated with a model in my admin and it has
an ImageField and a CharField. When I edit / add a record to the list and
do not upload an image, Click save and edit, it throws an error "This
field is required" and wipes out all of the previous data (the data is not
lost, it just doesn't appear in the list).
---model:
{{{
class Example(models.Model):
name = models.CharField(max_length=128)
test = models.ForeignKey(Test, related_name="examples")
image = models.ImageField(upload_to=settings.UPLOAD_TO)
}}}
---admin:
{{{
class ExampleInline(admin.TabularInline):
model = Example
class TestAdmin(admin.ModelAdmin):
inlines = [ExampleInline,]
admin.site.register(Test, TestAdmin)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/10002>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---