|
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 from iconolab_episteme import views |
|
23 |
|
24 import iconolab.urls |
|
25 |
|
26 urlpatterns = [ |
|
27 |
|
28 path('', include(iconolab.urls)), |
|
29 re_path(r'^$', django_views.generic.RedirectView.as_view(url=reverse_lazy("home"))), |
|
30 path('admin/', admin.site.urls), |
|
31 |
|
32 |
|
33 ] |
|
34 |
|
35 |
|
36 if settings.DJANGO_RUNSERVER: |
|
37 urlpatterns += staticfiles_urlpatterns() |
|
38 urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
|
39 #static url |
|
40 urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) |