mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #33205 -- Made call_command() raise TypeError when dest with multiple arguments is passed.
This commit is contained in:
parent
1feb55d607
commit
c1e4111c74
3 changed files with 54 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
def add_arguments(self, parser):
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
group.add_argument('--for', dest='until', action='store')
|
||||
group.add_argument('--until', action='store')
|
||||
|
||||
def handle(self, *args, **options):
|
||||
for option, value in options.items():
|
||||
if value is not None:
|
||||
self.stdout.write('%s=%s' % (option, value))
|
Loading…
Add table
Add a link
Reference in a new issue