addons-server/apps/zadmin/urls.py

29 строки
777 B
Python
Исходник Обычный вид История

2009-12-31 01:26:56 +03:00
from django.conf.urls.defaults import patterns, url, include
from django.contrib import admin
from django.shortcuts import redirect
from amo.urlresolvers import reverse
2009-12-31 01:43:25 +03:00
from . import views
2009-12-31 01:26:56 +03:00
urlpatterns = patterns('',
# AMO stuff.
url('^$', lambda r: redirect('admin:index'), name='zadmin.home'),
2010-03-25 01:52:02 +03:00
url('^env$', views.env, name='amo.env'),
url('^flagged', views.flagged, name='zadmin.flagged'),
2010-06-30 02:28:40 +04:00
url('^hera', views.hera, name='zadmin.hera'),
url('^settings', views.settings, name='zadmin.settings'),
2009-12-31 01:26:56 +03:00
# 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