Browse Source

Úprava urlpatterns

remotes/origin/upgrade1.9
Matěj Kocián 9 years ago
parent
commit
e82748c9cb
  1. 15
      galerie/urls.py
  2. 4
      korektury/urls.py
  3. 11
      mamweb/urls.py
  4. 5
      seminar/urls.py

15
galerie/urls.py

@ -1,12 +1,13 @@
# coding: utf-8
from django.conf.urls import patterns, include, url
from . import views
urlpatterns = patterns('',
(r'^(?P<pk>\d+)/$', 'galerie.views.nahled'),
(r'^(?P<pk>\d+)/(?P<fotka>\d+)/$', 'galerie.views.detail'),
(r'^(?P<galerie>\d+)/new/$', 'galerie.views.new_galerie'),
(r'^(?P<galerie>\d+)/plus/(?P<subgalerie>\d+)/$', 'galerie.views.plus_galerie'),
(r'^(?P<galerie>\d+)/minus/(?P<subgalerie>\d+)/$', 'galerie.views.minus_galerie'),
)
urlpatterns = [
url(r'^(?P<pk>\d+)/$', views.nahled),
url(r'^(?P<pk>\d+)/(?P<fotka>\d+)/$', views.detail),
url(r'^(?P<galerie>\d+)/new/$', views.new_galerie),
url(r'^(?P<galerie>\d+)/plus/(?P<subgalerie>\d+)/$', views.plus_galerie),
url(r'^(?P<galerie>\d+)/minus/(?P<subgalerie>\d+)/$', views.minus_galerie),
]

4
korektury/urls.py

@ -5,8 +5,8 @@ from . import views
staff_member_required = user_passes_test(lambda u: u.is_staff)
urlpatterns = patterns('',
urlpatterns = [
url(r'^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'),
url(r'^korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'),
)
]

11
mamweb/urls.py

@ -4,12 +4,13 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
from django.views.generic.base import TemplateView
from django import views
urlpatterns = patterns('',
urlpatterns = [
# Admin a nastroje
url(r'^admin/', include(admin.site.urls)), # NOQA
url(r'^ckeditor/', include('ckeditor.urls')),
url(r'^ckeditor/', include('ckeditor_uploader.urls')),
url(r'^autocomplete/', include('autocomplete_light.urls')),
# Seminarova aplikace (ma vlastni podadresare)
@ -22,11 +23,11 @@ urlpatterns = patterns('',
url(r'^comments_dj/', include('django_comments.urls')),
url(r'^comments_fl/', include('fluent_comments.urls')),
)
]
# This is only needed when using runserver.
if settings.DEBUG:
urlpatterns = patterns('',
urlpatterns = [
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', # NOQA
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
) + staticfiles_urlpatterns() + urlpatterns # NOQA
] + staticfiles_urlpatterns() + urlpatterns # NOQA

5
seminar/urls.py

@ -5,8 +5,7 @@ from . import views, export
staff_member_required = user_passes_test(lambda u: u.is_staff)
urlpatterns = patterns('',
urlpatterns = [
url(r'^co-je-MaM/organizatori/$', views.CojemamOrganizatoriView.as_view(), name='organizatori'),
url(r'^co-je-MaM/organizatori/organizovali/$', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'),
@ -44,4 +43,4 @@ urlpatterns = patterns('',
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>\d+)/tituly.tex', views.TitulyView,name='seminar_cislo_titul'),
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>\d+)/resitel_uloha.html$',
staff_member_required(views.resitelUlohaView),name='seminar_cislo_resitel_uloha'),
)
]

Loading…
Cancel
Save