Browse Source

Oprava /media, prevedeni na path misto url

export_seznamu_prednasek
parent
commit
1ee4a878b4
  1. 20
      mamweb/urls.py

20
mamweb/urls.py

@ -1,4 +1,4 @@
from django.conf.urls import * # NOQA
from django.urls import path, include
from django.conf.urls.i18n import i18n_patterns
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
@ -9,29 +9,29 @@ from django import views
urlpatterns = [
# Admin a nastroje
url('admin/', admin.site.urls), # NOQA
url('ckeditor/', include('ckeditor_uploader.urls')),
url('autocomplete/', include('autocomplete_light.urls')),
path('admin/', admin.site.urls), # NOQA
path('ckeditor/', include('ckeditor_uploader.urls')),
path('autocomplete/', include('autocomplete_light.urls')),
# Seminarova aplikace (ma vlastni podadresare)
url('', include('seminar.urls')),
path('', include('seminar.urls')),
# Korekturovaci aplikace (ma vlastni podadresare)
url('', include('korektury.urls')),
path('', include('korektury.urls')),
# Prednaskova aplikace (ma vlastni podadresare)
url('', include('prednasky.urls')),
path('', include('prednasky.urls')),
# Comments (interni i verejne)
url('comments_dj/', include('django_comments.urls')),
url('comments_fl/', include('fluent_comments.urls')),
path('comments_dj/', include('django_comments.urls')),
path('comments_fl/', include('fluent_comments.urls')),
]
# This is only needed when using runserver.
if settings.DEBUG:
urlpatterns += [
url('media/<str:path>', views.static.serve, # NOQA
path('media/<path:path>', views.static.serve, # NOQA
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
]
urlpatterns += staticfiles_urlpatterns()

Loading…
Cancel
Save