Alen Ribic
unread,Mar 11, 2009, 11:08:13 AM3/11/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django developers, da...@phoenixdevelopments.co.za, nad...@phoenixdevelopments.co.za
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