-
Notifications
You must be signed in to change notification settings - Fork 1
/
urls.py
33 lines (28 loc) · 1.08 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
from django.urls import path
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib import auth
from django.shortcuts import redirect
from django.urls.base import reverse
from django.contrib.staticfiles.urls import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from survey.views import IndexView
def home(request):
""" Permit to not get 404 while testing. """
return redirect(reverse("survey-list"))
urlpatterns = [
path('', IndexView.as_view(), name='survey-list'),
# path('', home , name="home"),
# url('accounts/', include('django.contrib.auth.urls')),
# url(r'^rosetta/', include('rosetta.urls')),
url('survey/', include('survey.urls')),
url(r'^admin/', admin.site.urls),
# url('', admin.site.urls),
# url('admin/', admin.site.urls),
]
urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)