urls.py 2.58 KB
Newer Older
1
# coding: utf8
2
# nm.debian.org website restricted pages
3
#
4
# Copyright (C) 2012--2014  Enrico Zini <enrico@debian.org>
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
20
21
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
Enrico Zini's avatar
Enrico Zini committed
22
from django.conf.urls import *
23
24
from . import views
from backend.mixins import VisitorTemplateView
25

26
urlpatterns = patterns('restricted.views',
27
    url(r'^$', VisitorTemplateView.as_view(template_name='restricted/index.html'), name="restricted_index"),
Enrico Zini's avatar
Enrico Zini committed
28
    # AM Personal page
29
    url(r'^ammain$', views.AMMain.as_view(), name="restricted_ammain"),
Enrico Zini's avatar
Enrico Zini committed
30
    # AM preferences editor
Enrico Zini's avatar
Enrico Zini committed
31
    url(r'^amprofile(?:/(?P<key>[^/]+))?$', views.AMProfile.as_view(), name="restricted_amprofile"),
Enrico Zini's avatar
Enrico Zini committed
32
    # Edit personal info
33
    url(r'^person/(?P<key>[^/]+)$', views.Person.as_view(), name="restricted_person"),
34
    url(r'^person/(?P<key>[^/]+)/fingerprints$', views.PersonFingerprints.as_view(), name="restricted_person_fingerprints"),
35
    # Create new process for a person (advocate)
Enrico Zini's avatar
Enrico Zini committed
36
    url(r'^advocate/(?P<applying_for>[^/]+)/(?P<key>[^/]+)$', views.NewProcess.as_view(), name="restricted_advocate"),
37
38
    # Show changelogs (minechangelogs)
    url(r'^minechangelogs/(?P<key>[^/]+)?$', 'minechangelogs', name="restricted_minechangelogs"),
39
    # Impersonate a user
40
    url(r'^impersonate/(?P<key>[^/]+)?$', views.Impersonate.as_view(), name="impersonate"),
Enrico Zini's avatar
Enrico Zini committed
41
    # Export database
42
    url(r'^db-export$', views.DBExport.as_view(), name="restricted_db_export"),
43
    # Download mail archive
44
    url(r'^mail-archive/(?P<key>[^/]+)$', views.MailArchive.as_view(), name="download_mail_archive"),
45
    # Display mail archive
46
    url(r'^display-mail-archive/(?P<key>[^/]+)$', views.DisplayMailArchive.as_view(), name="display_mail_archive"),
47
    # Assign AMs to NMs
48
    url(r'^assign-am/(?P<key>[^/]+)$', views.AssignAM.as_view(), name="assign_am"),
49
50
    # Mailbox stats
    url(r'^mailbox-stats$', views.MailboxStats.as_view(), name="mailbox_stats"),
51
)