summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/builder/base.py6
-rw-r--r--app/notes/build.py2
-rw-r--r--design/templates/archives/notes.html2
3 files changed, 5 insertions, 5 deletions
diff --git a/app/builder/base.py b/app/builder/base.py
index 4265b8d..bde3a33 100644
--- a/app/builder/base.py
+++ b/app/builder/base.py
@@ -25,8 +25,8 @@ class Build():
from jsmin import jsmin
fpath = '%s%s.min.%s' % (path, filename, ext)
compressed = jsmin(text_object.decode(encoding='UTF-8'))
- with open(fpath, 'wt') as js_file:
- minified = js_file.write(compressed)
+ with open(fpath, 'wb') as js_file:
+ minified = js_file.write(compressed.encode('utf-8'))
js_file.close()
def build_archive_pages(self, qs=None, base_path='', paginate_by=10):
@@ -266,7 +266,7 @@ class BuildMap(Build):
t = render_to_string('archives/map_data.html', c).encode('utf-8')
fpath = '%sdesign/templates/js/leaflet-providers.js' % settings.PROJ_ROOT
leaflet_providers_js = open(fpath, 'r').read()
- js = leaflet_providers_js + t.decode(encoding='UTF-8')
+ js = leaflet_providers_js + t.decode(encoding='utf-8')
self.write_file('media/js/', js.encode('utf-8'), 'js', 'mainmap')
c = Context({
'country_list': cl,
diff --git a/app/notes/build.py b/app/notes/build.py
index fa5dd1d..09612dc 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()
+ return self.get_model().objects.all().order_by('date_created')
def get_model(self):
return get_model('notes', 'note')
diff --git a/design/templates/archives/notes.html b/design/templates/archives/notes.html
index 1ac4d29..9eb55f3 100644
--- a/design/templates/archives/notes.html
+++ b/design/templates/archives/notes.html
@@ -12,7 +12,7 @@
</ul>
<main role="main">
<h1>Notes</h1>
-{% for object in object_list %}
+ {% for object in object_list %}
<article class="h-entry">
<div class="p-name e-content">
{{object.link_twitter_names|safe|amp|smartypants|urlizetrunc:45 }}