Diagram of django view lifecycle

Hey Chris, replying here for other people who land here looking for the same.
Your best bet would be to print something suggestive within each method of the classes BaseModelAdmin & ModelAdmin, you can find them under site-packages/django/contrib/admin/options.py

This is what I got, but keep in mind that this is the general order, not all methods will be executed for every action in the admin interface.

  1. get_changelist
  2. get_changelist_form
  3. get_changelist_formset
  4. get_form
  5. get_fieldsets
  6. get_prepopulated_fields
  7. get_readonly_fields
  8. get_queryset
  9. get_search_results
  10. get_urls
  11. get_inline_instances
  12. get_object
  13. formfield_for_foreignkey
  14. formfield_for_manytomany
  15. formfield_for_choice_field
  16. formfield_for_dbfield
  17. save_related
  18. delete_model
  19. save_model
  20. save_formset
  21. log_addition
  22. log_change
  23. log_deletion
2 Likes