Zmena nazvu views v urlconf

This commit is contained in:
Tomas Gavenciak 2015-04-01 14:05:04 +02:00
parent 467c7c53b3
commit 40f43f5208
3 changed files with 3 additions and 3 deletions

View file

@ -5,5 +5,5 @@ 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/$', 'seminar.views.AktualZadaniView'), url(r'^zadani/$', views.AktualniZadaniView, name='seminar.aktualni_zadani'),
) )

View file

@ -5,9 +5,9 @@ from django.views import generic
from .models import Problem, Cislo, Reseni, VysledkyKCislu, Nastaveni, Rocnik from .models import Problem, Cislo, Reseni, VysledkyKCislu, Nastaveni, Rocnik
def AktualZadaniView(request): def AktualniZadaniView(request):
nastaveni = get_object_or_404(Nastaveni) nastaveni = get_object_or_404(Nastaveni)
return render(request, 'seminar/AktualZadani.html', return render(request, 'seminar/AktualniZadani.html',
{'nastaveni' : nastaveni, {'nastaveni' : nastaveni,
}, },
) )