diff options
Diffstat (limited to 'app/blog')
-rw-r--r-- | app/blog/build.py | 11 | ||||
-rw-r--r-- | app/blog/models.py | 4 | ||||
-rw-r--r-- | app/blog/views.py | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/app/blog/build.py b/app/blog/build.py index 392e991..10553a6 100644 --- a/app/blog/build.py +++ b/app/blog/build.py @@ -16,7 +16,16 @@ class BuildEssays(BuildNew): response = self.client.get('/essays/') self.write_file('essays/', response.content) + def build_homepage(self): + response = self.client.get('/') + self.write_file('', response.content) + def essaybuilder(): - j = BuildEssays("essays", "essay") + j = BuildEssays("blog", "Entry") j.build() + + +def homebuilder(): + j = BuildEssays("blog", "Entry") + j.build_homepage() diff --git a/app/blog/models.py b/app/blog/models.py index 61ac407..ee4aca0 100644 --- a/app/blog/models.py +++ b/app/blog/models.py @@ -57,13 +57,13 @@ class Entry(models.Model): super(Entry, self).save() -class GuideSitemap(Sitemap): +class BlogSitemap(Sitemap): changefreq = "never" priority = 1.0 protocol = "https" def items(self): - return Essay.objects.filter(status=1) + return Entry.objects.filter(status=1) def lastmod(self, obj): return obj.pub_date diff --git a/app/blog/views.py b/app/blog/views.py index cf0fdf6..224decb 100644 --- a/app/blog/views.py +++ b/app/blog/views.py @@ -23,7 +23,7 @@ class EntryDetailView(DetailView): class EntryDetailViewTXT(EntryDetailView): - template_name = "entry_detail.txt" + template_name = "blog/entry_detail.txt" class EntryYearArchiveView(YearArchiveView): |