mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #22835 -- Deprecated NoArgsCommand.
This commit is contained in:
committed by
Tim Graham
parent
63670a474c
commit
9996158db4
@@ -603,6 +603,14 @@ class NoArgsCommand(BaseCommand):
|
||||
"""
|
||||
args = ''
|
||||
|
||||
def __init__(self):
|
||||
warnings.warn(
|
||||
"NoArgsCommand class is deprecated and will be removed in Django 2.0. "
|
||||
"Use BaseCommand instead, which takes no arguments by default.",
|
||||
RemovedInDjango20Warning
|
||||
)
|
||||
super(NoArgsCommand, self).__init__()
|
||||
|
||||
def handle(self, *args, **options):
|
||||
if args:
|
||||
raise CommandError("Command doesn't accept any arguments")
|
||||
|
||||
Reference in New Issue
Block a user