fix error 500 if CACHE_TILES is active
This commit is contained in:
parent
e35227caa2
commit
0346301f8e
1 changed files with 2 additions and 2 deletions
|
@ -103,12 +103,12 @@ def tile(request, level, zoom, x, y, access_permissions=None):
|
|||
|
||||
# get tile cache last update
|
||||
if settings.CACHE_TILES:
|
||||
tile_dirname = os.path.sep.join((settings.TILES_ROOT, str(level_data), str(zoom), str(x), str(y)))
|
||||
tile_dirname = os.path.sep.join((settings.TILES_ROOT, str(level), str(zoom), str(x), str(y)))
|
||||
last_update_filename = os.path.join(tile_dirname, 'last_update')
|
||||
tile_filename = os.path.join(tile_dirname, access_cache_key+'.png')
|
||||
|
||||
# get tile cache last update
|
||||
tile_cache_update_cache_key = 'mapdata:tile-cache-update:%d-%d-%d-%d' % (level_data, zoom, x, y)
|
||||
tile_cache_update_cache_key = 'mapdata:tile-cache-update:%d-%d-%d-%d' % (level, zoom, x, y)
|
||||
tile_cache_update = cache.get(tile_cache_update_cache_key, None)
|
||||
if tile_cache_update is None:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue