urls.py 1.69 KB
Newer Older
1
from django.conf.urls import patterns, include, url
Kálmán Viktor committed
2
# from django.views.generic import TemplateView
3 4

from django.contrib import admin
5 6
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
7

8
from circle.settings.base import get_env_variable
9
from dashboard.views import circle_login
10
from dashboard.forms import CirclePasswordResetForm, CircleSetPasswordForm
11

12 13
admin.autodiscover()

Kálmán Viktor committed
14 15
urlpatterns = patterns(
    '',
16 17 18 19 20 21 22 23
    #url(r'^$', TemplateView.as_view(template_name='base.html')),

    # Examples:
    # url(r'^$', 'circle.views.home', name='home'),
    # url(r'^circle/', include('circle.foo.urls')),

    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

24
    url(r'^$', lambda x: redirect(reverse("dashboard.index"))),
25
    url(r'^admin/', include(admin.site.urls)),
26
    url(r'^network/', include('network.urls')),
27
    url(r'^dashboard/', include('dashboard.urls')),
28 29 30 31 32 33 34 35 36 37 38 39

    url((r'^accounts/reset/(?P<uidb36>[0-9A-Za-z]{1,13})-'
         '(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$'),
        'django.contrib.auth.views.password_reset_confirm',
        {'set_password_form': CircleSetPasswordForm},
        name='accounts.password_reset_confirm'
        ),
    url(r'^accounts/password/reset/$', ("django.contrib.auth.views."
                                        "password_reset"),
        {'password_reset_form': CirclePasswordResetForm},
        name="accounts.password-reset",
        ),
40
    url(r'^accounts/login/?$', circle_login, name="accounts.login"),
41
    url(r'^accounts/', include('django.contrib.auth.urls')),
42
)
43 44 45 46 47 48 49


if get_env_variable('DJANGO_SAML', 'FALSE') == 'TRUE':
    urlpatterns += patterns(
        '',
        (r'^saml2/', include('djangosaml2.urls')),
    )