From 47a7cf0022619b4d8db8c40451edff7986431988 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Mon, 20 Jul 2015 15:46:34 +0200 Subject: [PATCH 1/2] Remove warning about RPi specific issue since it's no longer default RPi setting --- kalite/project/settings/raspberry_pi.py | 4 +++- kalite/updates/views.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kalite/project/settings/raspberry_pi.py b/kalite/project/settings/raspberry_pi.py index b5c7adc087..70c2ab6d6a 100644 --- a/kalite/project/settings/raspberry_pi.py +++ b/kalite/project/settings/raspberry_pi.py @@ -17,4 +17,6 @@ ENABLE_CLOCK_SET = True -DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP = True \ No newline at end of file +DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP = True + +USING_RASPBERRY_PI = True diff --git a/kalite/updates/views.py b/kalite/updates/views.py index 28accf9110..9f2fffef79 100644 --- a/kalite/updates/views.py +++ b/kalite/updates/views.py @@ -29,7 +29,9 @@ def update_context(request): @render_to("updates/update_videos.html") def update_videos(request, max_to_show=4): context = update_context(request) - messages.warning(request, _('For low-powered devices like the Raspberry Pi, please download less than 25 videos at a time.')) + if getattr(settings, 'USING_RASPBERRY_PI', False): + messages.warning(request, _('For low-powered devices like the Raspberry Pi, please download less than 25 videos at a time.')) + if DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP: messages.warning(request, _('After video download, the server must be restarted for them to be available to users.')) context.update({ From a274236ec579d1591cb03ea1c170006fbf3be1a0 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Mon, 20 Jul 2015 17:20:13 +0200 Subject: [PATCH 2/2] Also make old-style config package RPi aware --- kalite/settings/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/kalite/settings/__init__.py b/kalite/settings/__init__.py index 718962ab6d..4d8e2bad41 100644 --- a/kalite/settings/__init__.py +++ b/kalite/settings/__init__.py @@ -63,6 +63,7 @@ def package_selected(package_name): ENABLE_CLOCK_SET = getattr(local_settings, "ENABLE_CLOCK_SET", True) DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP = True + USING_RASPBERRY_PI = True if package_selected("nalanda"):