Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mattia Rizzolo
nm.debian.org
Commits
3e7c587b
Commit
3e7c587b
authored
Apr 25, 2020
by
Enrico Zini
Browse files
Cleaned up urls, removed old redirects. refs:
#12
parent
a7a30c5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
restricted/urls.py
View file @
3e7c587b
from
django.conf.urls
import
url
from
django.urls
import
path
from
django.views.generic
import
RedirectView
from
.
import
views
from
.
import
views
urlpatterns
=
[
urlpatterns
=
[
# Impersonate a user
# Impersonate a user
url
(
r
'^
impersonate/
(?P
<key>
[^/]+)?$
'
,
views
.
Impersonate
.
as_view
(),
name
=
"impersonate"
),
path
(
'
impersonate/<key>
/
'
,
views
.
Impersonate
.
as_view
(),
name
=
"impersonate"
),
# Export database
# Export database
url
(
r
'^
db-export
$
'
,
views
.
DBExport
.
as_view
(),
name
=
"restricted_db_export"
),
path
(
'
db-export
/
'
,
views
.
DBExport
.
as_view
(),
name
=
"restricted_db_export"
),
# Mailbox stats
# Mailbox stats
url
(
r
'^
mailbox-stats
$
'
,
views
.
MailboxStats
.
as_view
(),
name
=
"mailbox_stats"
),
path
(
'
mailbox-stats
/
'
,
views
.
MailboxStats
.
as_view
(),
name
=
"mailbox_stats"
),
# Export membership information for salsa
# Export membership information for salsa
url
(
r
'^salsa-export$'
,
views
.
SalsaExport
.
as_view
(),
name
=
"export_salsa"
),
path
(
'salsa-export/'
,
views
.
SalsaExport
.
as_view
(),
name
=
"export_salsa"
),
# Compatibility
url
(
r
'^ammain$'
,
RedirectView
.
as_view
(
url
=
"/process/am-dashboard"
,
permanent
=
True
)),
url
(
r
'^amprofile(?:/(?P<key>[^/]+))?$'
,
RedirectView
.
as_view
(
url
=
"/person/%(key)s/amprofile"
,
permanent
=
True
)),
url
(
r
'^minechangelogs/(?P<key>[^/]+)?$'
,
RedirectView
.
as_view
(
url
=
"/minechangelogs/search/%(key)s"
,
permanent
=
True
)),
url
(
r
'^mail-archive/(?P<key>[^/]+)$'
,
RedirectView
.
as_view
(
url
=
"/legacy/mail-archive/%(key)s"
,
permanent
=
True
)),
url
(
r
'^display-mail-archive/(?P<key>[^/]+)$'
,
RedirectView
.
as_view
(
url
=
"/legacy/display-mail-archive/%(key)s"
,
permanent
=
True
)),
]
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment