aboutsummaryrefslogtreecommitdiff
path: root/src/django_pgpmailman/urls.py
blob: 6a2df6361c82c41fe55cbfa67be6fdbf1b8f8baa (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
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Jan Jancar
#
# This file is a part of the Django Mailman PGP plugin.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU 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 General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program.  If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import, unicode_literals

from django.conf.urls import url, include

from django_pgpmailman.views.list import (
    pgp_list_index, pgp_list_summary, pgp_list_pubkey, pgp_list_key_management,
    ListSignatureSettingsView, ListEncryptionSettingsView)
from django_pgpmailman.views.user import pgp_user_profile

list_patterns = [
    url(r'^$', pgp_list_summary, name='pgp_list_summary'),
    url(r'^key/$', pgp_list_key_management, name='pgp_list_key_management'),
    url(r'^signatures/$', ListSignatureSettingsView.as_view(),
        name='pgp_list_signature_settings'),
    url(r'^encryption/$', ListEncryptionSettingsView.as_view(),
        name='pgp_list_encryption_settings'),
    url(r'^pubkey$', pgp_list_pubkey, name='pgp_list_pubkey')
]

user_patterns = [
    url(r'^$', pgp_user_profile, name='pgp_user_profile')
]

urlpatterns = [
    url(r'^$', pgp_list_index, name='pgp_list_index'),
    url(r'^lists/(?P<list_id>[^/]+)/', include(list_patterns)),
    url(r'^accounts/', include(user_patterns))
]