From ae5d3cbc578afce9e27b1094053c4cd3f16c6713 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 13:46:17 -0500 Subject: [PATCH] Add admin command to flush the staticfiles cache --- .../static_replace/management/__init__.py | 0 .../static_replace/management/commands/__init__.py | 0 .../commands/clear_collectstatic_cache.py | 13 +++++++++++++ 3 files changed, 13 insertions(+) create mode 100644 common/djangoapps/static_replace/management/__init__.py create mode 100644 common/djangoapps/static_replace/management/commands/__init__.py create mode 100644 common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py diff --git a/common/djangoapps/static_replace/management/__init__.py b/common/djangoapps/static_replace/management/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/common/djangoapps/static_replace/management/commands/__init__.py b/common/djangoapps/static_replace/management/commands/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py new file mode 100644 index 0000000000..1cea81b0af --- /dev/null +++ b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py @@ -0,0 +1,13 @@ +### +### Script for importing courseware from XML format +### + +from django.core.management.base import NoArgsCommand + +class Command(NoArgsCommand): + help = \ +'''Import the specified data directory into the default ModuleStore''' + + def handle_noargs(self): + staticfiles_cache = get_cache('staticfiles') + staticfiles_cache.clear()