Django - raw_id_fields title not refreshing.

Posted by James Howell on Stack Overflow See other posts from Stack Overflow or by James Howell
Published on 2010-04-28T09:50:39Z Indexed on 2010/04/28 10:43 UTC
Read the original article Hit count: 217

Filed under:

Hi,

I am currently having an issue when using the raw_id_field within admin.py in my Django project.

My site's admin area has a number of image upload fields for various different model pages which are all ForeignKey fields to an Image model where all images for the site are stored. As the site will eventually be dealing with a large quantity of images (100s, maybe 1000s) the default select box would be unusable.

I created various admin.ModelAdmin classes e.g

class InfoSlideAdmin(admin.ModelAdmin):
    raw_id_fields=('image',) 

These change the image selector within my Edit pages from a Select Box to a Raw ID Field.

However when I select a different image using this control although the ID of the new image is shown the title from the previous image still displays.

Any ideas?

© Stack Overflow or respective owner

Related posts about django