PageRenderTime 82ms CodeModel.GetById 41ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/tests/modeltests/user_commands/management/commands/dance.py

https://code.google.com/p/mango-py/
Python | 14 lines | 13 code | 1 blank | 0 comment | 0 complexity | f287ba667170be3f6f70291408fb799f MD5 | raw file
 1from optparse import make_option
 2from django.core.management.base import BaseCommand
 3
 4class Command(BaseCommand):
 5    help = "Dance around like a madman."
 6    args = ''
 7    requires_model_validation = True
 8
 9    option_list =[
10        make_option("-s", "--style", default="Rock'n'Roll")
11    ]
12
13    def handle(self, *args, **options):
14        self.stdout.write("I don't feel like dancing %s." % options["style"])