Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
29514cc2
Commit
29514cc2
authored
Dec 04, 2017
by
bmedx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update clear_collectstatic_cache management command to Django 1.11 spec
parent
70dc3359
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py
+14
-7
No files found.
common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py
View file @
29514cc2
###
### Script for importing courseware from XML format
###
"""
Django management command to clear the 'staticfiles' Django cache
"""
from
django.core.management.base
import
NoArgsCommand
from
__future__
import
print_function
from
django.core.management.base
import
BaseCommand
from
django.core.cache
import
caches
class
Command
(
NoArgsCommand
):
help
=
'Import the specified data directory into the default ModuleStore'
class
Command
(
BaseCommand
):
"""
Implementation of the management command
"""
help
=
'Empties the Django caches["staticfiles"] cache.'
def
handle
_noargs
(
self
,
**
options
):
def
handle
(
self
,
*
args
,
**
_
):
staticfiles_cache
=
caches
[
'staticfiles'
]
staticfiles_cache
.
clear
()
print
(
"Cache cleared."
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment