theming should be fine now

This commit is contained in:
Gwendolyn 2024-03-28 12:33:11 +01:00
parent 281e3495ef
commit 2548d62776
29 changed files with 1149 additions and 568 deletions

View file

@ -0,0 +1,15 @@
def mapdata_cache(func):
cache_key = None
cached_value = None
def wrapper():
nonlocal cached_value
nonlocal cache_key
from c3nav.mapdata.models import MapUpdate
current_cache_key = MapUpdate.current_cache_key()
if current_cache_key != cache_key:
cached_value = func()
cache_key = current_cache_key
return cached_value
return wrapper

View file

@ -13,7 +13,6 @@ def get_user_data(request):
'logged_in': bool(request.user.is_authenticated),
'allow_editor': can_access_editor(request),
'allow_control_panel': request.user_permissions.control_panel,
'show_nonpublic_themes': request.user_permissions.nonpublic_themes,
'has_positions': Position.user_has_positions(request.user)
}
if permissions: