Skip to content

Commit

Permalink
use our login for admin pages (bug 558510)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Balogh committed Jul 15, 2010
1 parent e59a7de commit 26bcd30
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/zadmin/urls.py
Expand Up @@ -2,6 +2,7 @@
from django.contrib import admin
from django.shortcuts import redirect

from amo.urlresolvers import reverse
from . import views


Expand All @@ -16,3 +17,12 @@
# The Django admin.
url('^models/', include(admin.site.urls)),
)


# Hijack the admin's login to use our pages.
def login(request):
url = '%s?to=%s' % (reverse('users.login'), request.path)
return redirect(url)


admin.site.login = login

0 comments on commit 26bcd30

Please sign in to comment.