diff options
author | luxagraf <sng@luxagraf.net> | 2014-06-26 13:33:04 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2014-06-26 13:33:04 +0000 |
commit | 6982108ae5f1db125089a37ab3dcaf58a92c4c74 (patch) | |
tree | 8d535baf68e48a7e110e81d2fba25b1ecc5670eb /app/builder/base.py | |
parent | 04983b41c0c8335c33bba8b7a0b445c5f06c2558 (diff) |
fixed small bug in build tools
Diffstat (limited to 'app/builder/base.py')
-rw-r--r-- | app/builder/base.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/builder/base.py b/app/builder/base.py index bde3a33..c77d358 100644 --- a/app/builder/base.py +++ b/app/builder/base.py @@ -72,10 +72,11 @@ class BuildWriting(Build): for entry in qs: c = Context({'object': entry, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL}) t = render_to_string('details/entry.html', c).encode('utf-8') - path = '%s/%s/' % (entry.pub_date.strftime("%Y/%b/%d").lower(), entry.slug) - self.write_file(path, t) - s = render_to_string('details/entry.txt', c).encode('utf-8') - self.write_file(path, s, 'txt') + path = '/%s/' %(entry.pub_date.strftime("%Y/%m").lower()) + slug = '%s' %(entry.slug) + self.write_file(path, t, 'html', slug) + s = render_to_string('details/entry.txt',c).encode('utf-8') + self.write_file(path, s,'txt', slug) def build_writing_archives(self): qs = self.get_model_querset() @@ -123,7 +124,7 @@ class BuildWriting(Build): c = Context({'type': 'monthly', 'date': '%s %s' % ( month_full_name, year), 'object_list': qs, }) t = render_to_string('archives/writing_date.html', c).encode('utf-8') - fpath = '%s/%s/' % (year, month_name) + fpath = '%s/%s/' % (year, month) self.write_file(fpath, t) def build_homepage(self): |