1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-22 19:18:22 +02:00

Upload photo authorizations

This commit is contained in:
Yohann D'ANELLO
2020-09-24 22:40:10 +02:00
parent e1ca18085a
commit 468295f648
11 changed files with 148 additions and 36 deletions

View File

@ -13,12 +13,14 @@ 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.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from django.views.defaults import bad_request, permission_denied, page_not_found, server_error
from django.views.generic import TemplateView
from corres2math import settings
urlpatterns = [
path('', TemplateView.as_view(template_name="index.html"), name='index'),
path('i18n/', include('django.conf.urls.i18n')),
@ -33,6 +35,9 @@ urlpatterns = [
path('', include('eastereggs.urls')),
]
# FIXME Protect files
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
handler400 = bad_request
handler403 = permission_denied
handler404 = page_not_found