diff options
author | luxagraf <sng@luxagraf.net> | 2015-11-20 14:28:12 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-11-20 14:28:12 +0000 |
commit | 1167d8086a826a4896cdcb5b36e78eeb1e6e8fb0 (patch) | |
tree | 38072e0aa34a5bc2bb12cbf3cee16c96e4292c9b /app/resume | |
parent | b04f88912b4474b4078797913af5d2e324ab97e2 (diff) | |
parent | e5f21b720bdde4edb87024aadba1d7525d26d407 (diff) |
Merge branch 'master' of https://git.luxagraf.net/luxagraf
Diffstat (limited to 'app/resume')
-rw-r--r-- | app/resume/build.py | 10 | ||||
-rw-r--r-- | app/resume/urls.py | 4 | ||||
-rw-r--r-- | app/resume/views.py | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/app/resume/build.py b/app/resume/build.py index 7241a70..2b472a4 100644 --- a/app/resume/build.py +++ b/app/resume/build.py @@ -3,13 +3,13 @@ from django.core.urlresolvers import reverse from builder.base import BuildNew -class BuildExpenses(BuildNew): +class BuildResume(BuildNew): def build(self): self.build_detail_view() self.build_list_view( - base_path=reverse("expenses:list_trip"), - paginate_by=24 + base_path=reverse("resume:list"), + paginate_by=99999 ) def get_model_queryset(self): @@ -17,7 +17,7 @@ class BuildExpenses(BuildNew): def build_detail_view(self): ''' - write out all the expenses for each trip + write out my backups of published articles ''' for obj in self.get_model_queryset(): url = obj.get_absolute_url() @@ -30,5 +30,5 @@ class BuildExpenses(BuildNew): def builder(): - j = BuildExpenses("expenses", "trip") + j = BuildResume("resume", "pubitem") j.build() diff --git a/app/resume/urls.py b/app/resume/urls.py index 15b2371..a359899 100644 --- a/app/resume/urls.py +++ b/app/resume/urls.py @@ -22,11 +22,11 @@ urlpatterns = [ url( regex=r'^(?P<slug>[-\w]+)$', view=views.PageView.as_view(), - name="intro" + name="cv" ), url( regex=r'^$', view=views.BaseView.as_view(), - name="cv" + name="intro" ), ] diff --git a/app/resume/views.py b/app/resume/views.py index 563ceaf..7e5de14 100644 --- a/app/resume/views.py +++ b/app/resume/views.py @@ -29,6 +29,9 @@ class PageView(DetailView): model = Page slug_field = "slug" + def get_queryset(self): + return Page.objects.filter(path__startswith=self.kwargs['slug']) + def get_template_names(self): return ["details/%s.html" % self.object.slug, 'details/page.html'] |