I am moving to Django1.10 from django 1.6.11 (I know this is very old. But finally moving to latest version)
My management commands are breaking.
class Command(LabelCommand):
label = 'filename'
def add_arguments(self, parser):
parser.add_argument('filename', nargs='+', type=str)
def handle_label(self, filename, **options):
print filename
Is this the correct way ? The above is not working as expected i.e.
For me the following worked: change
to
a line which I copied directly
django/django/core/management/base.py
when fixing my LabelCommands when migrating from 1.7 to 1.10.7.Although what you might want to do is to add substitute the line above with
to maintain forwards compatibility.