1 # -*- coding: utf-8 -*-
2 # Copyright (C) 1998-2019 by the Free Software Foundation, Inc.
4 # This file is part of Postorius.
6 # Postorius is free software: you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation, either version 3 of the License, or (at your option)
11 # Postorius is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 # You should have received a copy of the GNU General Public License along with
17 # Postorius. If not, see <http://www.gnu.org/licenses/>.
20 from django
.conf
.urls
import include
, url
21 from django
.contrib
import admin
22 from django
.http
import Http404
23 from django
.urls
import reverse_lazy
24 from django
.views
.defaults
import server_error
25 from django
.views
.generic
import RedirectView
28 def not_found(request
):
29 """A test view to return 404 error to test 400.html"""
30 raise Http404('Page not Found.')
34 url(r
'^$', RedirectView
.as_view(
35 url
=reverse_lazy('list_index'),
37 url(r
'^postorius/', include('postorius.urls')),
38 url(r
'', include('django_mailman3.urls')),
39 url(r
'^accounts/', include('allauth.urls')),
40 # Add some testing routes to test 400/500 error pages without having to
42 url(r
'500/$', server_error
),
43 url(r
'400/$', not_found
),
45 url(r
'^admin/', admin
.site
.urls
),