Skip to content

Commit 38fe755

Browse files
committed
Merge pull request #63 from ocefpaf/template_not_found
Fix #50 template not found on Windows OSes.
2 parents c646ab6 + 101daee commit 38fe755

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

folium/folium.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import codecs
1515
import functools
1616
import json
17-
import os
1817
from uuid import uuid4
1918

2019
from jinja2 import Environment, PackageLoader
@@ -157,10 +156,12 @@ def __init__(self, location=None, width=960, height=500,
157156
'stamenterrain', 'stamentoner']
158157
self.tile_types = {}
159158
for tile in self.default_tiles:
160-
join_tile_path = functools.partial(os.path.join, 'tiles', tile)
159+
tile_path = 'tiles/%s' % tile
161160
self.tile_types[tile] = {
162-
'templ': self.env.get_template(join_tile_path('tiles.txt')),
163-
'attr': self.env.get_template(join_tile_path('attr.txt')),
161+
'templ': self.env.get_template('%s/%s' % (tile_path,
162+
'tiles.txt')),
163+
'attr': self.env.get_template('%s/%s' % (tile_path,
164+
'attr.txt')),
164165
}
165166

166167
if self.tiles in self.tile_types:

0 commit comments

Comments
 (0)