Good day.

In the django/contrib/admin/options.py, I see that opts reference is
available in the template context of changelist_view, delete_view,
render_change_form, etc. but however not in history_view. We have a
simple scenario where we override the object_hostory.html and need
access to Model's _meta to access the model options.

I think that perhaps opts should be available in history template as
it is available on most other admin pages.

Any reason that this might be a bad or perhaps incomplete idea as I'd
like to go ahead and create a ticket.

Diff as per trunk:

Index: django/contrib/admin/options.py
===================================================================
--- django/contrib/admin/options.py     (revision 10031)
+++ django/contrib/admin/options.py     (working copy)
@@ -785,6 +785,7 @@
             'object': obj,
             'root_path': self.admin_site.root_path,
             'app_label': app_label,
+            "opts": opts,
         }
         context.update(extra_context or {})
         return render_to_response(self.object_history_template or [


Regards,
-Alen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to