summaryrefslogtreecommitdiff
path: root/app/notes
diff options
context:
space:
mode:
Diffstat (limited to 'app/notes')
-rw-r--r--app/notes/build.py4
-rw-r--r--app/notes/views.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/notes/build.py b/app/notes/build.py
index 09612dc..884c114 100644
--- a/app/notes/build.py
+++ b/app/notes/build.py
@@ -9,7 +9,7 @@ class BuildNotes(Build):
self.build_detail_pages()
def queryset(self):
- return self.get_model().objects.all().order_by('date_created')
+ return self.get_model().objects.all().order_by('-date_created')
def get_model(self):
return get_model('notes', 'note')
@@ -19,7 +19,7 @@ class BuildNotes(Build):
Grab all the notes, render them to a template string and write that out to the filesystem
'''
for entry in self.queryset():
- c = Context({'object': entry, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL})
+ c = Context({'object': entry, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL, 'SITE_URL':settings.SITE_URL})
t = render_to_string('details/note.html', c).encode('utf-8')
path = 'notes/%s/' % (entry.date_created.strftime("%Y/%m").lower())
self.write_file(path, t, 'html', entry.slug)
diff --git a/app/notes/views.py b/app/notes/views.py
index 2542293..e89087e 100644
--- a/app/notes/views.py
+++ b/app/notes/views.py
@@ -16,9 +16,9 @@ def entry_detail(request, year, month, slug):
def date_list(request, year, month=None):
if month:
- qs = Note.objects.filter(date_created__year=year, date_created__month=month)
+ qs = Note.objects.filter(date_created__year=year, date_created__month=month).order_by('-date_created')
else:
- qs = Note.objects.filter(date_created__year=year)
+ qs = Note.objects.filter(date_created__year=year).order_by('-date_created')
context = {
'year': year,
'month': month,