Fix a deprecation warning

This commit is contained in:
Johannes Linke
2015-12-05 13:23:53 +01:00
parent abd9e9707f
commit ff18ca1d2e
2 changed files with 6 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ from fnmatch import fnmatch
from optparse import make_option
import django
from django.core.management.base import NoArgsCommand, CommandError
from django.core.management.base import BaseCommand, CommandError
import django.template
from django.template import Context
from django.utils import six
@@ -40,9 +40,9 @@ else:
from StringIO import StringIO
class Command(NoArgsCommand):
class Command(BaseCommand):
help = "Compress content outside of the request/response cycle"
option_list = NoArgsCommand.option_list + (
option_list = BaseCommand.option_list + (
make_option('--extension', '-e', action='append', dest='extensions',
help='The file extension(s) to examine (default: ".html", '
'separate multiple extensions with commas, or use -e '

View File

@@ -2,15 +2,15 @@ import fnmatch
import os
from optparse import make_option
from django.core.management.base import NoArgsCommand, CommandError
from django.core.management.base import BaseCommand, CommandError
from compressor.conf import settings
from compressor.cache import cache, get_mtime, get_mtime_cachekey
class Command(NoArgsCommand):
class Command(BaseCommand):
help = "Add or remove all mtime values from the cache"
option_list = NoArgsCommand.option_list + (
option_list = BaseCommand.option_list + (
make_option('-i', '--ignore', action='append', default=[],
dest='ignore_patterns', metavar='PATTERN',
help="Ignore files or directories matching this glob-style "