summaryrefslogtreecommitdiff
path: root/app/builder
diff options
context:
space:
mode:
Diffstat (limited to 'app/builder')
-rw-r--r--app/builder/base.py6
1 files changed, 3 insertions, 3 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,