src/iconolab_mcc/urls.py
author ymh <ymh.work@gmail.com>
Fri, 05 Jul 2019 15:58:49 +0200
changeset 38 58f02a3ca6a8
parent 1 309def3c05dc
permissions -rw-r--r--
Added tag 0.1.38 for changeset 7e614ca2431a

"""iconolab_mcc URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django import views as django_views
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import include, path, re_path, reverse_lazy
from iconolab_mcc import views

import iconolab.urls

urlpatterns = [
    
    path('', include(iconolab.urls)),
    re_path(r'^$', django_views.generic.RedirectView.as_view(url=reverse_lazy("home"))),
    path('admin/', admin.site.urls),

    path('credits/', views.misc.CreditsView.as_view(), name="iconolab_mcc_credits"),
    path('legalmentions/', views.misc.LegalMentionsView.as_view(), name="iconolab_mcc_legals"),
    path('contributioncharter/', views.misc.ContributionCharterView.as_view(), name="iconolab_mcc_charter"),
    
    
]


if settings.DJANGO_RUNSERVER:
    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    #static url
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)