From 0e001a08ecf243613654bde5e87f2761839d6f20 Mon Sep 17 00:00:00 2001 From: Mikhail Yumanov Date: Thu, 11 Mar 2021 12:09:27 +0300 Subject: [PATCH] CST-10 znick#336 BaseCommand.option_list is deprecated since django 1.8 --- anytask/users/management/commands/create_shad.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/anytask/users/management/commands/create_shad.py b/anytask/users/management/commands/create_shad.py index ba4afa844..5e38c453a 100644 --- a/anytask/users/management/commands/create_shad.py +++ b/anytask/users/management/commands/create_shad.py @@ -37,13 +37,13 @@ def get_users_from_cs_xml(cs_xml_fn): class Command(BaseCommand): help = "Creating shad users, python course, shad school." - option_list = BaseCommand.option_list + ( - make_option('--year', - action='store', - dest='year', - default=None, - help='Course start year'), - ) + def add_arguments(self, parser): + parser.add_argument('--year', + action='store', + dest='year', + default=None, + help='Course start year') + def handle(self, **options): year = options['year']