Commit 7a76d26b by andreas.pelme

git-svn-id: https://django-compress.googlecode.com/svn/trunk@8 98d35234-f74b-0410-9e22-51d878bdf110

parent b19ed0f1
from django.conf import settings
COMPRESS = getattr(settings, 'COMPRESS', not settings.DEBUG)
COMRESS_AUTO = getattr(settings, 'COMPRESS_AUTH', True)
COMPRESS_CSS_FILTERS = getattr(settings, 'COMPRESS_CSS_FILTERS', ('compress.filters.csstidy.CSSTidyFilter', ))
COMPRESS_JS_FILTERS = getattr(settings, 'COMPRESS_JS_FILTERS', ('compress.filters.jsmin.JSMinFilter',))
COMPRESS_CSS = getattr(settings, 'COMPRESS_CSS', {})
......
from django.core.management.base import BaseCommand
from django.core.management.base import NoArgsCommand
from optparse import make_option
from django.conf import settings
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
class Command(NoArgsCommand):
option_list = NoArgsCommand.option_list + (
make_option('--force', action='store_true', default=False, help='Force update of all files, even if the source files are older than the current compressed file.'),
make_option('--verbosity', action='store', dest='verbosity', default='1',
type='choice', choices=['0', '1', '2'],
help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'),
)
help = 'Updates and compresses CSS and JavsScript on-demand, with no need to restart Django'
help = 'Updates and compresses CSS and JavsScript on-demand, without restarting Django'
args = ''
def handle(self, **options):
def handle_noargs(self, **options):
force = options.get('force', False)
verbosity = int(options.get('verbosity', 1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment