I am having a problem when using raw_id_field inside admin.py in my Django project.
In my site administration area there are several fields for uploading images for different model pages, which are ForeignKey fields for the image model, where all the images for the site are stored. Since the site will ultimately deal with a large number of images (100, maybe 1000 s), the default selection box will be unusable.
I created various admin.ModelAdmin classes like
class InfoSlideAdmin(admin.ModelAdmin):
raw_id_fields=('image',)
This changes the image selector within my edit pages from the "Select" field to the "Raw field" field.
However, when I select another image using this control, although the identifier of the new image is displayed, the caption from the previous image is still displayed.
Any ideas?
source
share