Unifomize license headers

This commit is contained in:
Alexandre Iooss 2022-03-11 17:16:11 +01:00
parent 9dc40279fa
commit 8d44182af8
51 changed files with 249 additions and 135 deletions

View file

@ -1,18 +1,13 @@
# This file is part of photo21
# Copyright (C) 2022 Amicale des élèves de l'ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
"""photo21 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/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.contrib import admin
from django.urls import include, path, re_path
from django.conf import settings
@ -21,16 +16,18 @@ from django.conf.urls.static import static
from .views import IndexView, MediaAccess
urlpatterns = [
path('', IndexView.as_view(), name='index'),
path('', include('photologue.urls', namespace='photologue')),
path('accounts/', include('allauth.urls')),
path('i18n/', include('django.conf.urls.i18n')),
path('admin/doc/', include('django.contrib.admindocs.urls')),
path('admin/', admin.site.urls),
path("", IndexView.as_view(), name="index"),
path("", include("photologue.urls", namespace="photologue")),
path("accounts/", include("allauth.urls")),
path("i18n/", include("django.conf.urls.i18n")),
path("admin/doc/", include("django.contrib.admindocs.urls")),
path("admin/", admin.site.urls),
]
# In production media are served through NGINX with X-Accel-Redirect
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
else:
urlpatterns.append(re_path('^media/(?P<path>.*)', MediaAccess.as_view(), name='media'))
urlpatterns.append(
re_path("^media/(?P<path>.*)", MediaAccess.as_view(), name="media")
)