Tomas "Jethro" Pokorny
6 years ago
3 changed files with 17 additions and 19 deletions
@ -1,13 +1,13 @@ |
|||||
# coding: utf-8 |
# coding: utf-8 |
||||
|
|
||||
from django.conf.urls import include, url |
from django.urls import path |
||||
from . import views |
from . import views |
||||
|
|
||||
urlpatterns = [ |
urlpatterns = [ |
||||
url(r'^(?P<pk>\d+)/$', views.nahled), |
path('<int:pk>/', views.nahled), |
||||
url(r'^(?P<pk>\d+)/(?P<fotka>\d+)/$', views.detail), |
path('<int:pk>/<int:fotka>/', views.detail), |
||||
url(r'^(?P<galerie>\d+)/new/$', views.new_galerie), |
path('<int:galerie>/new/', views.new_galerie), |
||||
url(r'^(?P<galerie>\d+)/plus/(?P<subgalerie>\d+)/$', views.plus_galerie), |
path('<int:galerie>/plus/<int:subgalerie>/', views.plus_galerie), |
||||
url(r'^(?P<galerie>\d+)/minus/(?P<subgalerie>\d+)/$', views.minus_galerie), |
path('<int:galerie>/minus/<int:subgalerie>/', views.minus_galerie), |
||||
] |
] |
||||
|
|
||||
|
@ -1,12 +1,11 @@ |
|||||
from django.conf.urls import * # NOQA |
from django.urls import path |
||||
from django.conf.urls import url |
|
||||
from django.contrib.auth.decorators import user_passes_test |
from django.contrib.auth.decorators import user_passes_test |
||||
from . import views |
from . import views |
||||
|
|
||||
staff_member_required = user_passes_test(lambda u: u.is_staff) |
staff_member_required = user_passes_test(lambda u: u.is_staff) |
||||
|
|
||||
urlpatterns = [ |
urlpatterns = [ |
||||
url(r'^korektury/$', staff_member_required(views.KorekturyListView.as_view()), name='korektury-list'), |
path('korektury/', staff_member_required(views.KorekturyListView.as_view()), name='korektury-list'), |
||||
url(r'^korektury/(?P<pdf>\d+)/$', staff_member_required(views.KorekturyView.as_view()), name='korektury'), |
path('korektury/<int:pdf>/', 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/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'), |
||||
] |
] |
||||
|
@ -1,15 +1,14 @@ |
|||||
from django.conf.urls import * # NOQA |
from django.urls import path |
||||
from django.conf.urls import url |
|
||||
from django.contrib.auth.decorators import user_passes_test |
from django.contrib.auth.decorators import user_passes_test |
||||
from . import views |
from . import views |
||||
|
|
||||
staff_member_required = user_passes_test(lambda u: u.is_staff) |
staff_member_required = user_passes_test(lambda u: u.is_staff) |
||||
|
|
||||
urlpatterns = [ |
urlpatterns = [ |
||||
url(r'^prednasky/$', views.newPrednaska), |
path('prednasky/', views.newPrednaska), |
||||
url(r'^prednasky/hotovo$', views.Prednaska_hotovo), |
path('prednasky/hotovo', views.Prednaska_hotovo), |
||||
url(r'^prednasky/metaseznam_prednasek$', staff_member_required(views.MetaSeznamListView.as_view()), name='metaseznam-list'), |
path('prednasky/metaseznam_prednasek', staff_member_required(views.MetaSeznamListView.as_view()), name='metaseznam-list'), |
||||
url(r'^prednasky/seznam_prednasek/(?P<seznam>\d+)/$', staff_member_required(views.SeznamListView.as_view()), name='seznam-list'), |
path('prednasky/seznam_prednasek/<int:seznam>/export', staff_member_required(views.SeznamExportView), name='seznam-export'), |
||||
url(r'^prednasky/seznam_prednasek/(?P<seznam>\d+)/export$', staff_member_required(views.SeznamExportView), name='seznam-export'), |
path('prednasky/seznam_prednasek/<int:seznam>/', staff_member_required(views.SeznamListView.as_view()), name='seznam-list'), |
||||
# url(r'^korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'), |
# path('korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'), |
||||
] |
] |
||||
|
Loading…
Reference in new issue