#21472: Django 1.6 ImageField not rendered properly in Admin inline form
-------------------------------+--------------------------------------
     Reporter:  agale031176@…  |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  Uncategorized  |                  Version:  1.6
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  1
-------------------------------+--------------------------------------

Comment (by anonymous):

 Here is the code that I have that works in 1.4.9 but not in later
 releases:

 In the '''models.py''':

 class Property(models.Model):
     property_id = models.IntegerField(primary_key=True, default=0)
     title = models.CharField(max_length=250, null=False)
     village = models.ForeignKey(Village, 'name')

 class PropertyImages(models.Model):
     property_id = models.ForeignKey(Property)
     image_path = models.ImageField(null=False, upload_to='test')

 Then in the '''admin.py''':

 class PropertyImagesAdmin(admin.TabularInline):
     model = PropertyImages
     fields = ['image_path']

 class PropertyAdmin(admin.ModelAdmin):
     fields = [
         'title', 'village'
     ]

     inlines = [
         PropertyImagesAdmin,
     ]


 admin.site.register(Property, PropertyAdmin)

 I am not sure if Django is the problem or I have to do this differently in
 later version.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21472#comment:4>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/079.72228d7cd2c7b206882a3e624b4d0ba5%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to