Tuesday, July 25, 2017

Adding code when pressing one of admin's save buttons

I am using Django's admin interface to create new records. A record includes (amongst other fields) the date and time that a photo was taken. These fields will be filled into the database when either the 'Save and add another', 'Save and continue editing' or the 'Save' buttons are pressed (i.e. these details will be read from the image file and entered into the database rather than the administrator doing this manually).

 

How can I added the extra code required to add the date and time when I press one of these buttons? Some example code would be appreciated.

 

Thanks

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/63559d9c-15c6-4ce1-b477-8e24b030ce0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment