#10061: incorrect logout link in admin
-------------------------------------------+--------------------------------
Reporter: lashni | Owner: Alex
Status: assigned | Milestone:
Component: django.contrib.admin | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Comment (by jleingang):
Applying this patch fixes the logout/password change urls but breaks a
custom admin view:
{{{
class SupportAdmin(admin.AdminSite):
def get_urls(self):
from django.conf.urls.defaults import patterns, url
urls = super(SupportAdmin, self).get_urls()
my_urls = patterns('',
url(r'^pledge/teamapproach/$',
self.admin_view(self.team_approach), name="support_admin_teamapproach"),
)
return my_urls + urls
def team_approach(self, request, *args, **kwargs):
...
context = {
'adminform': selector_form,
'media': selector_form.media,
'admin_site': self.name
}
return
render_to_response("admin/pledge/team_approach_selector.html", context,
context_instance=RequestContext(request))
}}}
This view wouldn't work unless admin_site was added to the context. Just
wanted to mention this change appears to be necessary for any custom admin
view
--
Ticket URL: <http://code.djangoproject.com/ticket/10061#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---