rendermap: render a public and a non-public version of the map

This commit is contained in:
Laura Klünder 2016-12-13 19:16:51 +01:00
parent 9c202ab6cd
commit 237b89dcc8
4 changed files with 75 additions and 44 deletions

View file

@ -7,6 +7,11 @@ from c3nav.mapdata.models import Source
from c3nav.mapdata.utils.cache import get_packages_cached
def get_public_packages():
packages_cached = get_packages_cached()
return [packages_cached[name] for name in settings.PUBLIC_PACKAGES]
def get_unlocked_packages_names(request, packages_cached=None):
if packages_cached is None:
packages_cached = get_packages_cached()