Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
df531198
Verified
Commit
df531198
authored
Oct 06, 2019
by
Sli
Browse files
django2.2: fix urls and adapt them to new format
parent
12b6f0d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
api/urls.py
View file @
df531198
...
...
@@ -50,7 +50,7 @@ router.register(
urlpatterns
=
[
# API
re_path
(
r
"^"
,
include
(
router
.
urls
)),
re_path
(
r
"^login/"
,
include
(
"rest_framework.
re_path
s"
,
namespace
=
"rest_framework"
)),
re_path
(
r
"^login/"
,
include
(
"rest_framework.
url
s"
,
namespace
=
"rest_framework"
)),
re_path
(
r
"^markdown$"
,
RenderMarkdown
,
name
=
"api_markdown"
),
re_path
(
r
"^mailings$"
,
FetchMailingLists
,
name
=
"mailings_fetch"
),
]
pedagogy/views.py
View file @
df531198
...
...
@@ -33,7 +33,7 @@ from django.views.generic import (
from
django.utils
import
html
from
django.http
import
HttpResponse
from
django.core.exceptions
import
PermissionDenied
,
ObjectDoesNotExist
from
django.
core.urlresolver
s
import
reverse_lazy
,
reverse
from
django.
url
s
import
reverse_lazy
,
reverse
from
django.shortcuts
import
get_object_or_404
from
django.conf
import
settings
...
...
sith/urls.py
View file @
df531198
...
...
@@ -39,9 +39,9 @@ Including another URLconf
"""
from
django.urls
import
include
,
re_path
from
django.contrib
import
admin
from
django.urls.static
import
static
from
django.conf
import
settings
from
django.views.i18n
import
javascript_catalog
from
django.conf.urls.static
import
static
from
django.views.i18n
import
JavaScriptCatalog
from
ajax_select
import
urls
as
ajax_select_urls
js_info_dict
=
{
"packages"
:
(
"sith"
,)}
...
...
@@ -51,61 +51,43 @@ handler404 = "core.views.not_found"
handler500
=
"core.views.internal_servor_error"
urlpatterns
=
[
re_path
(
r
"^"
,
include
(
"core.
re_paths"
,
namespace
=
"core"
,
app_nam
e
=
"core"
)),
re_path
(
r
"^"
,
include
(
(
"core.
urls"
,
"core"
)
,
namespac
e
=
"core"
)),
re_path
(
r
"^rootplace/"
,
include
(
"rootplace.re_paths"
,
namespace
=
"rootplace"
,
app_name
=
"rootplace"
),
r
"^rootplace/"
,
include
((
"rootplace.urls"
,
"rootplace"
),
namespace
=
"rootplace"
)
),
re_path
(
r
"^subscription/"
,
include
(
"subscription.re_paths"
,
namespace
=
"subscription"
,
app_name
=
"subscription"
),
include
((
"subscription.urls"
,
"subscription"
),
namespace
=
"subscription"
),
),
re_path
(
r
"^com/"
,
include
(
"com.re_paths"
,
namespace
=
"com"
,
app_name
=
"com"
)),
re_path
(
r
"^club/"
,
include
(
"club.re_paths"
,
namespace
=
"club"
,
app_name
=
"club"
)),
re_path
(
r
"^counter/"
,
include
(
"counter.re_paths"
,
namespace
=
"counter"
,
app_name
=
"counter"
),
),
re_path
(
r
"^stock/"
,
include
(
"stock.re_paths"
,
namespace
=
"stock"
,
app_name
=
"stock"
)),
re_path
(
r
"^com/"
,
include
((
"com.urls"
,
"com"
),
namespace
=
"com"
)),
re_path
(
r
"^club/"
,
include
((
"club.urls"
,
"club"
),
namespace
=
"club"
)),
re_path
(
r
"^counter/"
,
include
((
"counter.urls"
,
"counter"
),
namespace
=
"counter"
)),
re_path
(
r
"^stock/"
,
include
((
"stock.urls"
,
"stock"
),
namespace
=
"stock"
)),
re_path
(
r
"^accounting/"
,
include
(
"accounting.re_paths"
,
namespace
=
"accounting"
,
app_name
=
"accounting"
),
),
re_path
(
r
"^eboutic/"
,
include
(
"eboutic.re_paths"
,
namespace
=
"eboutic"
,
app_name
=
"eboutic"
),
include
((
"accounting.urls"
,
"accounting"
),
namespace
=
"accounting"
),
),
re_path
(
r
"^eboutic/"
,
include
((
"eboutic.urls"
,
"eboutic"
),
namespace
=
"eboutic"
)),
re_path
(
r
"^launderette/"
,
include
(
"launderette.re_paths"
,
namespace
=
"launderette"
,
app_name
=
"launderette"
),
),
re_path
(
r
"^sas/"
,
include
(
"sas.re_paths"
,
namespace
=
"sas"
,
app_name
=
"sas"
)),
re_path
(
r
"^api/v1/"
,
include
(
"api.re_paths"
,
namespace
=
"api"
,
app_name
=
"api"
)),
re_path
(
r
"^election/"
,
include
(
"election.re_paths"
,
namespace
=
"election"
,
app_name
=
"election"
),
),
re_path
(
r
"^forum/"
,
include
(
"forum.re_paths"
,
namespace
=
"forum"
,
app_name
=
"forum"
)),
re_path
(
r
"^trombi/"
,
include
(
"trombi.re_paths"
,
namespace
=
"trombi"
,
app_name
=
"trombi"
)
include
((
"launderette.urls"
,
"launderette"
),
namespace
=
"launderette"
),
),
re_path
(
r
"^sas/"
,
include
((
"sas.urls"
,
"sas"
),
namespace
=
"sas"
)),
re_path
(
r
"^api/v1/"
,
include
((
"api.urls"
,
"api"
),
namespace
=
"api"
)),
re_path
(
r
"^matmatronch/"
,
include
(
"matmat.re_paths"
,
namespace
=
"matmat"
,
app_name
=
"matmat"
),
r
"^election/"
,
include
((
"election.urls"
,
"election"
),
namespace
=
"election"
)
),
re_path
(
r
"^forum/"
,
include
((
"forum.urls"
,
"forum"
),
namespace
=
"forum"
)),
re_path
(
r
"^trombi/"
,
include
((
"trombi.urls"
,
"trombi"
),
namespace
=
"trombi"
)),
re_path
(
r
"^matmatronch/"
,
include
((
"matmat.urls"
,
"matmat"
),
namespace
=
"matmat"
)),
re_path
(
r
"^pedagogy/"
,
include
(
"pedagogy.re_paths"
,
namespace
=
"pedagogy"
,
app_name
=
"pedagogy"
),
r
"^pedagogy/"
,
include
((
"pedagogy.urls"
,
"pedagogy"
),
namespace
=
"pedagogy"
)
),
re_path
(
r
"^admin/"
,
include
(
admin
.
site
.
re_paths
)
),
re_path
(
r
"^ajax_select/"
,
include
(
ajax_select_
re_path
s
)),
re_path
(
r
"^i18n/"
,
include
(
"django.urls.i18n"
)),
re_path
(
r
"^jsi18n/$"
,
j
ava
s
cript
_c
atalog
,
js_info_dict
,
name
=
"javascript-catalog"
),
re_path
(
r
"^captcha/"
,
include
(
"captcha.
re_path
s"
)),
re_path
(
r
"^admin/"
,
admin
.
site
.
urls
),
re_path
(
r
"^ajax_select/"
,
include
(
ajax_select_
url
s
)),
re_path
(
r
"^i18n/"
,
include
(
"django.
conf.
urls.i18n"
)),
re_path
(
r
"^jsi18n/$"
,
J
ava
S
cript
C
atalog
.
as_view
()
,
name
=
"javascript-catalog"
),
re_path
(
r
"^captcha/"
,
include
(
"captcha.
url
s"
)),
]
if
settings
.
DEBUG
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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