I have this Command(BaseCommand) class with this defined:
make_option('--username', action='store_true', dest='username', default=None),
Then I try to run it like this:
python manage.py thescript --username=something
The output is:
manage.py: error: --username option does not take a value
Why?
EDIT
I am always getting None:
class Command(BaseCommand):
args = '--username=username ...'
help = '...'
option_list = BaseCommand.option_list + (
make_option('--username', action='store', default=None, help='...'),
)
def handle(self, *args, **options):
print options['username']