Update routing, urls, verejne url, ...
This commit is contained in:
parent
eb4aaccccb
commit
5d24b33d65
3 changed files with 9 additions and 7 deletions
|
@ -18,6 +18,8 @@ SITE_ID = 1
|
||||||
ROOT_URLCONF = 'mamweb.urls'
|
ROOT_URLCONF = 'mamweb.urls'
|
||||||
WSGI_APPLICATION = 'mamweb.wsgi.application'
|
WSGI_APPLICATION = 'mamweb.wsgi.application'
|
||||||
|
|
||||||
|
APPEND_SLASH = False
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/1.7/topics/i18n/
|
# https://docs.djangoproject.com/en/1.7/topics/i18n/
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class ExportIndexView(generic.base.TemplateView):
|
||||||
context['exports'] = []
|
context['exports'] = []
|
||||||
for r in Rocnik.objects.all():
|
for r in Rocnik.objects.all():
|
||||||
if r.verejna_cisla():
|
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])
|
context['exports'].append(url.split('/')[-1])
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@ from django.conf.urls import patterns, url
|
||||||
from . import views, export
|
from . import views, export
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
url(r'^rocnik/(?P<pk>\d+)/$', views.RocnikView.as_view(), name='seminar.rocnik'),
|
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'^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'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'),
|
||||||
url(r'^zadani/$', views.AktualniZadaniView, name='seminar.aktualni_zadani'),
|
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/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/index.csv$', export.ExportIndexView.as_view(), name='seminar_export_index'),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue