2009-04-05 17:27:26 +00:00
|
|
|
from optparse import make_option
|
2011-10-13 18:04:12 +00:00
|
|
|
|
2007-09-21 16:19:20 +00:00
|
|
|
from django.core.management.base import BaseCommand
|
|
|
|
|
2011-10-13 18:04:12 +00:00
|
|
|
|
2007-09-21 16:19:20 +00:00
|
|
|
class Command(BaseCommand):
|
|
|
|
help = "Dance around like a madman."
|
|
|
|
args = ''
|
|
|
|
requires_model_validation = True
|
|
|
|
|
2009-04-05 17:27:26 +00:00
|
|
|
option_list =[
|
2012-02-09 18:56:41 +00:00
|
|
|
make_option("-s", "--style", default="Rock'n'Roll"),
|
|
|
|
make_option("-x", "--example")
|
2009-04-05 17:27:26 +00:00
|
|
|
]
|
|
|
|
|
2007-09-21 16:19:20 +00:00
|
|
|
def handle(self, *args, **options):
|
2012-02-09 18:56:41 +00:00
|
|
|
example = options["example"]
|
2010-09-13 05:28:01 +00:00
|
|
|
self.stdout.write("I don't feel like dancing %s." % options["style"])
|