mPowering/django-orb

Management commands error: 'BaseCommand' has no attribute 'option_list'

Closed this issue · 1 comments

On running the export_db_translations management command I'm getting the error:

AttributeError: type object 'BaseCommand' has no attribute 'option_list'

Seems this is due to deprecation in django 1.8 and so no longer working now we've updated to 1.11: https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/#django.core.management.BaseCommand.option_list

Looks like it's affecting the export_db_translations, import_db_translations, load_orb_countries and load_orb_languages management commands

Seems the updates aren't accepting the model fields as params:

(env) $ python manage.py export_db_translations --language=es orb.models.Category.name
usage: manage.py export_db_translations [-h] [--version] [-v {0,1,2,3}]
[--settings SETTINGS]
[--pythonpath PYTHONPATH]
[--traceback] [--no-color]
[--language LANGUAGE]
manage.py export_db_translations: error: unrecognized arguments: orb.models.Category.name
(env) $

Not sure if there is another way these additional/optional model/field args should be passed?