diff options
Diffstat (limited to 'app/resume/views.py')
-rw-r--r-- | app/resume/views.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/resume/views.py b/app/resume/views.py index 7e5de14..d7230f7 100644 --- a/app/resume/views.py +++ b/app/resume/views.py @@ -30,11 +30,11 @@ class PageView(DetailView): slug_field = "slug" def get_queryset(self): - return Page.objects.filter(path__startswith=self.kwargs['slug']) + try: + return Page.objects.get(path__startswith=self.kwargs['path']) + except: + return Page.objects.get(path__startswith=self.kwargs['path'],slug=self.kwargs['slug']) + def get_template_names(self): return ["details/%s.html" % self.object.slug, 'details/page.html'] - - -class BaseView(TemplateView): - template_name = "archives/resume.html" |