Browse Source

Update routing, urls, verejne url, ...

remotes/origin/feincms
Tomas Gavenciak 10 years ago
parent
commit
5d24b33d65
  1. 2
      mamweb/settings_common.py
  2. 2
      seminar/export.py
  3. 12
      seminar/urls.py

2
mamweb/settings_common.py

@ -18,6 +18,8 @@ SITE_ID = 1
ROOT_URLCONF = 'mamweb.urls'
WSGI_APPLICATION = 'mamweb.wsgi.application'
APPEND_SLASH = False
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/

2
seminar/export.py

@ -13,7 +13,7 @@ class ExportIndexView(generic.base.TemplateView):
context['exports'] = []
for r in Rocnik.objects.all():
if r.verejna_cisla():
url = reverse('seminar.export.rocnik', kwargs={'prvni_rok': r.prvni_rok})
url = reverse('seminar:export_rocnik', kwargs={'prvni_rok': r.prvni_rok})
context['exports'].append(url.split('/')[-1])
return context

12
seminar/urls.py

@ -2,11 +2,11 @@ from django.conf.urls import patterns, url
from . import views, export
urlpatterns = patterns('',
url(r'^rocnik/(?P<pk>\d+)/$', views.RocnikView.as_view(), name='seminar.rocnik'),
url(r'^cislo/(?P<pk>\d+)/$', views.CisloView.as_view(), name='seminar.cislo'),
url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar.problem'),
url(r'^zadani/$', views.AktualniZadaniView, name='seminar.aktualni_zadani'),
url(r'^rocnik/(?P<pk>\d+)/$', views.RocnikView.as_view(), name='seminar_rocnik'),
url(r'^cislo/(?P<pk>\d+)/$', views.CisloView.as_view(), name='seminar_cislo'),
url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'),
url(r'^zadani/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'),
url(r'^aesop-export/mam-rocnik-(?P<prvni_rok>\d+)\.csv$', export.ExportRocnikView.as_view(), name='seminar.export.rocnik'),
url(r'^aesop-export/index.csv$', export.ExportIndexView.as_view(), name='seminar.export.index'),
url(r'^aesop-export/mam-rocnik-(?P<prvni_rok>\d+)\.csv$', export.ExportRocnikView.as_view(), name='seminar_export_rocnik'),
url(r'^aesop-export/index.csv$', export.ExportIndexView.as_view(), name='seminar_export_index'),
)

Loading…
Cancel
Save