From 3127dc888a9fc68d50ed8de2e3460743458c2956 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Thu, 20 Jun 2019 22:08:44 +0200 Subject: [PATCH] Upraveny urls.py ve zbyvajicich aplikacich. --- galerie/urls.py | 12 ++++++------ korektury/urls.py | 9 ++++----- prednasky/urls.py | 15 +++++++-------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/galerie/urls.py b/galerie/urls.py index 487ddc22..4d1e8f24 100644 --- a/galerie/urls.py +++ b/galerie/urls.py @@ -1,13 +1,13 @@ # coding: utf-8 -from django.conf.urls import include, url +from django.urls import path from . import views urlpatterns = [ - url(r'^(?P\d+)/$', views.nahled), - url(r'^(?P\d+)/(?P\d+)/$', views.detail), - url(r'^(?P\d+)/new/$', views.new_galerie), - url(r'^(?P\d+)/plus/(?P\d+)/$', views.plus_galerie), - url(r'^(?P\d+)/minus/(?P\d+)/$', views.minus_galerie), + path('/', views.nahled), + path('//', views.detail), + path('/new/', views.new_galerie), + path('/plus//', views.plus_galerie), + path('/minus//', views.minus_galerie), ] diff --git a/korektury/urls.py b/korektury/urls.py index a1fe8469..d6394820 100644 --- a/korektury/urls.py +++ b/korektury/urls.py @@ -1,12 +1,11 @@ -from django.conf.urls import * # NOQA -from django.conf.urls import url +from django.urls import path from django.contrib.auth.decorators import user_passes_test from . import views staff_member_required = user_passes_test(lambda u: u.is_staff) urlpatterns = [ - url(r'^korektury/$', staff_member_required(views.KorekturyListView.as_view()), name='korektury-list'), - url(r'^korektury/(?P\d+)/$', staff_member_required(views.KorekturyView.as_view()), name='korektury'), - url(r'^korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'), + path('korektury/', staff_member_required(views.KorekturyListView.as_view()), name='korektury-list'), + path('korektury//', staff_member_required(views.KorekturyView.as_view()), name='korektury'), + path('korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'), ] diff --git a/prednasky/urls.py b/prednasky/urls.py index e00abea4..e7890745 100644 --- a/prednasky/urls.py +++ b/prednasky/urls.py @@ -1,15 +1,14 @@ -from django.conf.urls import * # NOQA -from django.conf.urls import url +from django.urls import path from django.contrib.auth.decorators import user_passes_test from . import views staff_member_required = user_passes_test(lambda u: u.is_staff) urlpatterns = [ - url(r'^prednasky/$', views.newPrednaska), - url(r'^prednasky/hotovo$', views.Prednaska_hotovo), - url(r'^prednasky/metaseznam_prednasek$', staff_member_required(views.MetaSeznamListView.as_view()), name='metaseznam-list'), - url(r'^prednasky/seznam_prednasek/(?P\d+)/$', staff_member_required(views.SeznamListView.as_view()), name='seznam-list'), - url(r'^prednasky/seznam_prednasek/(?P\d+)/export$', staff_member_required(views.SeznamExportView), name='seznam-export'), -# url(r'^korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'), + path('prednasky/', views.newPrednaska), + path('prednasky/hotovo', views.Prednaska_hotovo), + path('prednasky/metaseznam_prednasek', staff_member_required(views.MetaSeznamListView.as_view()), name='metaseznam-list'), + path('prednasky/seznam_prednasek//export', staff_member_required(views.SeznamExportView), name='seznam-export'), + path('prednasky/seznam_prednasek//', staff_member_required(views.SeznamListView.as_view()), name='seznam-list'), +# path('korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'), ]