diff options
author | luxagraf <sng@luxagraf.net> | 2014-06-09 14:51:22 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2014-06-09 14:51:22 +0000 |
commit | 63c62d596dfe49a3675f125b6481f138bdbf2498 (patch) | |
tree | 6b1119ca2988986fa073968c294a4ce828dafe21 /app/builder | |
parent | 09d1f8a5aa94bc56ac50a1162360ceae56c38dd0 (diff) |
fixed some bugs in notes and map build
Diffstat (limited to 'app/builder')
-rw-r--r-- | app/builder/base.py | 6 |
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, |