This repository has been archived by the owner on Jan 5, 2019. It is now read-only.
/
urls.py
52 lines (36 loc) · 1.58 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# coding: utf-8
"""
Secure JavaScript Login
~~~~~~~~~~~~~~~~~~~~~~~
:copyleft: 2007-2015 by the secure-js-login team, see AUTHORS for more details.
:created: by JensDiemer.de
:license: GNU GPL v3 or above, see LICENSE for more details
"""
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from secure_js_login.honypot.urls import urls as honypot_urls
from secure_js_login.urls import urls as secure_js_login_urls
from . import views
urlpatterns = patterns('',
url(r'^$', views.index),
url(r'^debug_on/$', views.debug_on, name='debug_on'),
url(r'^debug_off/$', views.debug_off, name='debug_off'),
url(r'^totp_on/$', views.totp_on, name='totp_on'),
url(r'^totp_off/$', views.totp_off, name='totp_off'),
url(r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'),
url(r'^login/', include(honypot_urls)),
url(r'^secure_login/', include(secure_js_login_urls)),
url(r'^admin/', include(admin.site.urls)),
)
# Explicit include the "grossly inefficient and probably insecure" staticfiles views,
# so that "runserver --insecure" can be used even if the DEBUG setting is False
# Should never be used in production!
urlpatterns += staticfiles_urlpatterns()
if settings.USE_DJANGO_TOOLBAR:
import debug_toolbar
urlpatterns = patterns('',
url(r'^__debug__/', include(debug_toolbar.urls)),
) + urlpatterns