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
8f048572
Commit
8f048572
authored
Apr 21, 2020
by
Enrico Zini
Browse files
Use path in main site urls. refs:
#9
parent
2aae357f
Changes
1
Hide whitespace changes
Inline
Side-by-side
nm2/urls.py
View file @
8f048572
from
django.urls
import
include
,
path
,
re_path
from
django.urls
import
include
,
path
from
django.views.generic
import
TemplateView
from
backend.mixins
import
VisitorTemplateView
from
django.conf
import
settings
...
...
@@ -24,43 +24,43 @@ django.conf.urls.handler500 = nmviews.Error500.as_view()
urlpatterns
=
[
path
(
'robots.txt'
,
TemplateView
.
as_view
(
template_name
=
'robots.txt'
,
content_type
=
"text/plain"
),
name
=
"root_robots_txt"
),
re_
path
(
r
'^
i18n/'
,
include
(
'django.conf.urls.i18n'
)),
re_
path
(
r
'
^$
'
,
VisitorTemplateView
.
as_view
(
template_name
=
'index.html'
),
name
=
"home"
),
re_
path
(
r
'^
license/
$
'
,
VisitorTemplateView
.
as_view
(
template_name
=
'license.html'
),
name
=
"root_license"
),
re_
path
(
r
'^
faq/
$
'
,
VisitorTemplateView
.
as_view
(
template_name
=
'faq.html'
),
name
=
"root_faq"
),
re_
path
(
r
'^
members/
$
'
,
public_views
.
Members
.
as_view
(),
name
=
"members"
),
re_
path
(
r
'^
legacy/'
,
include
(
"legacy.urls"
)),
re_
path
(
r
'^
person/'
,
include
(
"person.urls"
)),
re_
path
(
r
'^
public/'
,
include
(
"public.urls"
)),
re_
path
(
r
'^
am/'
,
include
(
"restricted.urls"
)),
re_
path
(
r
'^
fprs/'
,
include
(
"fprs.urls"
)),
re_
path
(
r
'^
process/'
,
include
(
"process.urls"
)),
re_
path
(
r
'^
dm/'
,
include
(
"dm.urls"
)),
re_
path
(
r
'^
api/'
,
include
(
"api.urls"
)),
re_
path
(
r
'^
apikeys/'
,
include
(
"apikeys.urls"
)),
re_
path
(
r
'^
keyring/'
,
include
(
"keyring.urls"
)),
re_
path
(
r
'^
wizard/'
,
include
(
"wizard.urls"
)),
re_
path
(
r
'^
mia/'
,
include
(
"mia.urls"
)),
re_
path
(
r
'^
minechangelogs/'
,
include
(
"minechangelogs.urls"
)),
re_
path
(
r
'^
sitechecks/'
,
include
(
"sitechecks.urls"
)),
re_
path
(
r
'^
deploy/'
,
include
(
"deploy.urls"
)),
path
(
'
i18n/'
,
include
(
'django.conf.urls.i18n'
)),
path
(
r
''
,
VisitorTemplateView
.
as_view
(
template_name
=
'index.html'
),
name
=
"home"
),
path
(
'
license/'
,
VisitorTemplateView
.
as_view
(
template_name
=
'license.html'
),
name
=
"root_license"
),
path
(
'
faq/'
,
VisitorTemplateView
.
as_view
(
template_name
=
'faq.html'
),
name
=
"root_faq"
),
path
(
'
members/'
,
public_views
.
Members
.
as_view
(),
name
=
"members"
),
path
(
'
legacy/'
,
include
(
"legacy.urls"
)),
path
(
'
person/'
,
include
(
"person.urls"
)),
path
(
'
public/'
,
include
(
"public.urls"
)),
path
(
'
am/'
,
include
(
"restricted.urls"
)),
path
(
'
fprs/'
,
include
(
"fprs.urls"
)),
path
(
'
process/'
,
include
(
"process.urls"
)),
path
(
'
dm/'
,
include
(
"dm.urls"
)),
path
(
'
api/'
,
include
(
"api.urls"
)),
path
(
'
apikeys/'
,
include
(
"apikeys.urls"
)),
path
(
'
keyring/'
,
include
(
"keyring.urls"
)),
path
(
'
wizard/'
,
include
(
"wizard.urls"
)),
path
(
'
mia/'
,
include
(
"mia.urls"
)),
path
(
'
minechangelogs/'
,
include
(
"minechangelogs.urls"
)),
path
(
'
sitechecks/'
,
include
(
"sitechecks.urls"
)),
path
(
'
deploy/'
,
include
(
"deploy.urls"
)),
re_
path
(
r
'^
rest/api/'
,
include
(
router
.
urls
)),
path
(
'
rest/api/'
,
include
(
router
.
urls
)),
path
(
r
'signon/'
,
include
(
"signon.urls"
)),
path
(
'signon/'
,
include
(
"signon.urls"
)),
# Uncomment the admin/doc line below to enable admin documentation:
re_
path
(
r
'^
admin/doc/'
,
include
(
'django.contrib.admindocs.urls'
)),
path
(
'
admin/doc/'
,
include
(
'django.contrib.admindocs.urls'
)),
# Uncomment the next line to enable the admin:
re_
path
(
r
'^
admin/'
,
admin
.
site
.
urls
),
path
(
'
admin/'
,
admin
.
site
.
urls
),
]
if
settings
.
DEBUG
:
try
:
import
debug_toolbar
urlpatterns
+=
[
re_
path
(
r
'^
__debug__/'
,
include
(
debug_toolbar
.
urls
)),
path
(
'
__debug__/'
,
include
(
debug_toolbar
.
urls
)),
]
except
ImportError
:
pass
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