Skip to content

Commit ca0047e

Browse files
authored
Merge pull request #742 from labrown/align-urls-py-with-upstream
Align mailman-web/urls.py with upstream per #713
2 parents e029835 + 2cd01ff commit ca0047e

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

web/mailman-web/urls.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
2+
# Copyright (C) 2023 by the Free Software Foundation, Inc.
33
#
4-
# This file is part of Postorius.
4+
# This file is part of mailman-web.
55
#
66
# Postorius is free software: you can redistribute it and/or modify it under
77
# the terms of the GNU General Public License as published by the Free
@@ -16,19 +16,25 @@
1616
# You should have received a copy of the GNU General Public License along with
1717
# Postorius. If not, see <http://www.gnu.org/licenses/>.
1818

19+
1920
from django.conf.urls import include
2021
from django.contrib import admin
2122
from django.urls import path, reverse_lazy
2223
from django.views.generic import RedirectView
2324

2425
urlpatterns = [
25-
path(r'', RedirectView.as_view(
26-
url=reverse_lazy('list_index'),
27-
permanent=True)),
28-
path(r'postorius/', include('postorius.urls')),
29-
path(r'hyperkitty/', include('hyperkitty.urls')),
30-
path(r'', include('django_mailman3.urls')),
31-
path(r'accounts/', include('allauth.urls')),
32-
# Django admin
33-
path(r'admin/', admin.site.urls),
26+
path(
27+
"",
28+
RedirectView.as_view(url=reverse_lazy("list_index"), permanent=True),
29+
),
30+
# Include alternate Postorius and HyperKitty URLs.
31+
path("postorius/", include("postorius.urls")),
32+
path("hyperkitty/", include("hyperkitty.urls")),
33+
# Order counts for various links. Put the above first and the following
34+
# after so the suggested Apache config still works.
35+
path("mailman3/", include("postorius.urls")),
36+
path("archives/", include("hyperkitty.urls")),
37+
path("", include("django_mailman3.urls")),
38+
path("accounts/", include("allauth.urls")),
39+
path("admin/", admin.site.urls),
3440
]

0 commit comments

Comments
 (0)