|
|
|
from django.conf.urls import * # NOQA
|
|
|
|
from django.conf.urls import patterns, url
|
|
|
|
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<pdf>\d+)/$', views.KorekturyBaseView.as_view(), name='korektury'),
|
|
|
|
url(r'^korektury/(?P<pdf>\d+)/korektury/$', views.KorekturyView.as_view(), name='korektury'),
|
|
|
|
url(r'^korektury/(?P<pdf>\d+)/request/$', views.KorekturyRequestView.as_view(), name='korektury-request'),
|
|
|
|
# FIXME url(r'^korektury/(?P<pdf>\d+)/$', staff_member_required(views.KorekturyView.as_view()), name='korektury'),
|
|
|
|
# FIXME url(r'^korektury/(?P<pdf>\d+)/request/$', staff_member_required(views.KorekturyRequestView.as_view()), name='korektury-request'),
|
|
|
|
url(r'^korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'),
|
|
|
|
]
|