|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | -# Copyright (C) 1998-2016 by the Free Software Foundation, Inc. |
| 2 | +# Copyright (C) 2023 by the Free Software Foundation, Inc. |
3 | 3 | # |
4 | | -# This file is part of Postorius. |
| 4 | +# This file is part of mailman-web. |
5 | 5 | # |
6 | 6 | # Postorius is free software: you can redistribute it and/or modify it under |
7 | 7 | # the terms of the GNU General Public License as published by the Free |
|
16 | 16 | # You should have received a copy of the GNU General Public License along with |
17 | 17 | # Postorius. If not, see <http://www.gnu.org/licenses/>. |
18 | 18 |
|
| 19 | + |
19 | 20 | from django.conf.urls import include |
20 | 21 | from django.contrib import admin |
21 | 22 | from django.urls import path, reverse_lazy |
22 | 23 | from django.views.generic import RedirectView |
23 | 24 |
|
24 | 25 | 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), |
34 | 40 | ] |
0 commit comments