from django.conf import settings from django.contrib.staticfiles import views from django.contrib import admin from django.urls import path, re_path, include from django.views.generic.base import RedirectView from core import views as core urlpatterns = [ path('tinymce/', include('tinymce.urls')), # Remplace trumbowyg path('admin/', admin.site.urls), path('favicon.ico', RedirectView.as_view(url = '/static/favicon.ico')), re_path(r'youtube/(?P.*)$', RedirectView.as_view(url='https://feeds.duhaz.fr/flux/%(path)s')), re_path(r'lecture_flux/(?P.*)$', RedirectView.as_view(url='https://feeds.duhaz.fr/flux/lecture_flux/%(path)s')), path('blog/', include('blog.urls')), path('', RedirectView.as_view(url = 'blog/')), path('' , core.index, name='core_index'), # url generique re_path(r'page/(?P[a-zA-Z0-9_,-/]+)', core.page, name='core_page'), # last chance re_path(r'(?P[a-zA-Z0-9_.,-]+)', core.page, name='core_page'), ] if settings.DEBUG: urlpatterns += [ re_path(r'^static/(?P.*)$', views.serve), ]