0
|
1 |
"""iconolab_episteme URL Configuration |
|
2 |
|
|
3 |
The `urlpatterns` list routes URLs to views. For more information please see: |
|
4 |
https://docs.djangoproject.com/en/2.0/topics/http/urls/ |
|
5 |
Examples: |
|
6 |
Function views |
|
7 |
1. Add an import: from my_app import views |
|
8 |
2. Add a URL to urlpatterns: path('', views.home, name='home') |
|
9 |
Class-based views |
|
10 |
1. Add an import: from other_app.views import Home |
|
11 |
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') |
|
12 |
Including another URLconf |
|
13 |
1. Import the include() function: from django.urls import include, path |
|
14 |
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) |
|
15 |
""" |
|
16 |
from django import views as django_views |
|
17 |
from django.conf import settings |
|
18 |
from django.conf.urls.static import static |
|
19 |
from django.contrib import admin |
|
20 |
from django.contrib.staticfiles.urls import staticfiles_urlpatterns |
|
21 |
from django.urls import include, path, re_path, reverse_lazy |
|
22 |
|
|
23 |
import iconolab.urls |
|
24 |
|
|
25 |
urlpatterns = [ |
|
26 |
|
|
27 |
path('', include(iconolab.urls)), |
|
28 |
re_path(r'^$', django_views.generic.RedirectView.as_view(url=reverse_lazy("home"))), |
|
29 |
path('admin/', admin.site.urls), |
|
30 |
|
|
31 |
|
|
32 |
] |
|
33 |
|
|
34 |
|
|
35 |
if settings.DJANGO_RUNSERVER: |
|
36 |
urlpatterns += staticfiles_urlpatterns() |
|
37 |
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
|
38 |
#static url |
|
39 |
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) |