Commit 9b66783d authored by Michaël Paulon's avatar Michaël Paulon
Browse files

Changes in includes for django 2

parent 9ad1c308
......@@ -13,7 +13,7 @@ from rest_framework.response import Response
APPS_API = ['comptes', 'activites', 'consos']
urlpatterns = [
url('^%s/' % app, include('%s.api' % app, namespace=app)) for app in APPS_API
url('^%s/' % app, include(('%s.api' % app, '%s_api' % app), namespace=app)) for app in APPS_API
class NKAPIRootView(views.APIView):
......@@ -26,11 +26,11 @@ urlpatterns = [
# Page d'accueil
url(r'^$', RedirectView.as_view(permanent=True, pattern_name="comptes:login"), name="accueil"),
# Applications
url(r'^comptes/', include('comptes.urls', namespace="comptes")),
url(r'^consos/', include('consos.urls', namespace="consos")),
url(r'^activites/', include('activites.urls', namespace="activités")),
url(r'^comptes/', include(('comptes.urls', 'comptes'), namespace="comptes")),
url(r'^consos/', include(('consos.urls', 'consos'), namespace="consos")),
url(r'^activites/', include(('activites.urls', 'activites'), namespace="activités")),
url(r'^api/', include('note_kfet.api', namespace="api")),
url(r'^api/', include(('note_kfet.api', 'api'), namespace="api")),
# URL de fichiers multimédias, accessibles après autorisation
url(r'^media/(?P<type>[a-zA-Z0-9]+)/(?P<id>[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12})/', NginxMediaView.as_view(), name="nginx-media"),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment