aboutsummaryrefslogtreecommitdiffstats
path: root/urls.py
blob: 4d315cbab5ffa8fcb34cf21b85fa5ceb97b4b616 (plain)
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
# git-refinery-web - URLs
#
# Based on the Django project template
#
# Copyright (c) Django Software Foundation and individual contributors.
# All rights reserved.

from django.conf.urls import include, url
from django.urls import reverse_lazy
from django.views.generic import RedirectView, TemplateView
from gitrefinery.auth_views import CaptchaRegistrationView, CaptchaPasswordResetView, delete_account_view, \
    PasswordResetSecurityQuestions

from django.contrib import admin
admin.autodiscover()

urlpatterns = [
    url(r'^gitrefinery/', include('gitrefinery.urls')),
    url(r'^admin/', admin.site.urls),
    url(r'^accounts/password_reset/$',
        CaptchaPasswordResetView.as_view(
            email_template_name='registration/password_reset_email.txt',
            success_url=reverse_lazy('password_reset_done')),
        name='password_reset'),
    url(r'^accounts/register/$', CaptchaRegistrationView.as_view(),
        name='django_registration_register'),
    url(r'^accounts/delete/$', delete_account_view,
        {'template_name': 'layerindex/deleteaccount.html'},
        name='delete_account'),
    url(r'^accounts/reregister/$', TemplateView.as_view(
        template_name='registration/reregister.html'),
        name='reregister'),
    url(r'^accounts/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,3}-[0-9A-Za-z]{1,20})/$',
        PasswordResetSecurityQuestions.as_view(),
        name='password_reset_confirm',
        ),
    url(r'^accounts/reset/fail/$', TemplateView.as_view(
        template_name='registration/password_reset_fail.html'),
        name='password_reset_fail'),
    url(r'^accounts/lockout/$', TemplateView.as_view(
        template_name='registration/account_lockout.html'),
        name='account_lockout'),
    #url(r'^accounts/', include('registration.backends.hmac.urls')),
    url(r'^accounts/', include('django_registration.backends.activation.urls')),
    url(r'^accounts/', include('django.contrib.auth.urls')),
    url(r'^captcha/', include('captcha.urls')),
    url(r'.*', RedirectView.as_view(url='/gitrefinery/')),
]
#if 'rrs' in settings.INSTALLED_APPS:
#    urlpatterns += [
#        url(r'^rrs/', include('rrs.urls')),
#    ]