Please forgive my naiveté with Django.
I want to create my own method which works much like prepopulated_fields for my custom admin page. Basically, when you put the url of an image in one field, I’d like to populate another field with the name of the image, height and width via javascript.
What would be the best approach? Just override the change_form.html and include my own JS lib? Write a custom widget?
Using Javascript would be a probable move, if for some reason you want to show the attributes of the image.
See Javascript – Get Image height for an example of doing this.
If there’s no need to show it at the form level but to simply populate the usually prefer to do this at the model level, such as
Good luck!