Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Admin history_view has no opts in context
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alen Ribic  
View profile  
 More options Mar 11 2009, 11:08 am
From: Alen Ribic <alen.ri...@gmail.com>
Date: Wed, 11 Mar 2009 08:08:13 -0700 (PDT)
Local: Wed, Mar 11 2009 11:08 am
Subject: Admin history_view has no opts in context
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »