From 2d4ca51241acde8a25fa937de996245b7b17685d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 5 Jan 2019 20:07:32 +0100 Subject: [PATCH] pwa: only enable PWA if pwa_display is standalone (#29471) --- combo/apps/pwa/__init__.py | 2 +- combo/apps/pwa/templatetags/pwa.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/combo/apps/pwa/__init__.py b/combo/apps/pwa/__init__.py index 19952e6c..df72c2e0 100644 --- a/combo/apps/pwa/__init__.py +++ b/combo/apps/pwa/__init__.py @@ -31,7 +31,7 @@ class AppConfig(django.apps.AppConfig): def get_extra_manager_actions(self): from django.conf import settings - if settings.TEMPLATE_VARS.get('pwa_display') in ('standalone', 'fullscreen'): + if settings.TEMPLATE_VARS.get('pwa_display') == 'standalone': return [{'href': reverse('pwa-manager-homepage'), 'text': _('Mobile Application (PWA)')}] return [] diff --git a/combo/apps/pwa/templatetags/pwa.py b/combo/apps/pwa/templatetags/pwa.py index 6f169f9b..39928c2b 100644 --- a/combo/apps/pwa/templatetags/pwa.py +++ b/combo/apps/pwa/templatetags/pwa.py @@ -24,7 +24,7 @@ register = template.Library() @register.simple_tag(takes_context=True) def pwa_navigation(context): - if settings.TEMPLATE_VARS.get('pwa_display') not in ('standalone', 'fullscreen'): + if settings.TEMPLATE_VARS.get('pwa_display') != 'standalone': return '' pwa_navigation_template = template.loader.get_template('combo/pwa/navigation.html') entries = list(PwaNavigationEntry.objects.all())