Skip to content

Commit 13adf62

Browse files
committed
Merge pull request #5074 from aronasorman/cant-have-too-many-collectstatics
Preserve content pack assets from collectstatic(clear=True).
2 parents bd7535f + 683e95c commit 13adf62

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

data/version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
all:
77
- Tweaks to our documentation (#5067)
88
- Refactor assessment item asking logic in the setup command (#5065)
9+
- Properly copy over docs pages while preserving content pack assets (#5074)
910
students: []
1011
coaches: []
1112
admins: []

kalite/distributed/management/commands/setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,15 @@ def handle(self, *args, **options):
482482
# Now deploy the static files
483483
logging.info("Copying static media...")
484484
ensure_dir(settings.STATIC_ROOT)
485-
call_command("collectstatic", interactive=False, verbosity=0, ignore_patterns=['vtt', 'html', 'srt'],
485+
486+
# The following file ignores have to be preserved from a
487+
# collectstatic(clear=True), due to being bundled with content packs,
488+
# and we thus have now way of getting them back.
489+
collectstatic_ignores = [
490+
"*.vtt", "*.srt", # subtitle files come with language packs -- don't delete
491+
"*/perseus/ke/exercises/*", # exercises come with language packs, and we have no way to replicate
492+
]
493+
call_command("collectstatic", interactive=False, verbosity=0, ignore_patterns=collectstatic_ignores,
486494
clear=True)
487495
call_command("collectstatic_js_reverse", interactive=False)
488496

0 commit comments

Comments
 (0)