Add the preparestatic command

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-06 03:13:53 -04:00
parent 0d6409512a
commit b6e7a462b0
5 changed files with 24 additions and 0 deletions

View File

@@ -241,6 +241,7 @@
* Backport MultipleObjectMixin improvements.
* Remove ObjectListPermissionFilterMixin.
* Add deprecation warning to convertdb
* Add the preparestatic command.
3.1.11 (2019-04-XX)
===================

View File

@@ -274,6 +274,8 @@ Other changes
* Backport MultipleObjectMixin improvements.
* Remove ObjectListPermissionFilterMixin.
* Add deprecation warning to convertdb
* Add the preparestatic command.
Removals
--------

View File

@@ -0,0 +1,21 @@
from __future__ import unicode_literals
from django.core import management
IGNORE_LIST = [
'AUTHORS*', 'CHANGE*', 'CONTRIBUT*', 'CODE_OF_CONDUCT*', 'Grunt*',
'LICENSE*', 'MAINTAIN*', 'README*', '*.html*', '*.less', '*.md', '*.nupkg',
'*.nuspec', '*.scss*', '*.sh', '*tests*', 'bower*', 'composer.json*',
'demo*', 'docs', 'grunt*', 'gulp*', 'install', 'less', 'package.json*',
'package-lock*', 'test', 'tests', 'variable*',
]
class Command(management.BaseCommand):
help = 'Call the collectstatic command with some sane defaults.'
def handle(self, *app_labels, **options):
management.call_command(
command_name='collectstatic', ignore=IGNORE_LIST,
clear=True
)