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?
The title is refreshed via Javascript when you close the pop-up window. It's possible that you have some sort of cross-domain issue which is preventing the JS from running - this does sometimes occur when you're running via the development server on eg port 8080.
Have a look at what the console in Firebug is showing you (you are using Firebug to debug Javascript problems, aren't you?).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With