mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Converted remaining management commands to argparse
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
from optparse import make_option
|
||||
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
|
||||
@@ -8,10 +6,9 @@ class Command(BaseCommand):
|
||||
args = ''
|
||||
requires_system_checks = True
|
||||
|
||||
option_list = BaseCommand.option_list + (
|
||||
make_option("-s", "--style", default="Rock'n'Roll"),
|
||||
make_option("-x", "--example")
|
||||
)
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument("-s", "--style", default="Rock'n'Roll")
|
||||
parser.add_argument("-x", "--example")
|
||||
|
||||
def handle(self, *args, **options):
|
||||
example = options["example"]
|
||||
|
||||
Reference in New Issue
Block a user