Выполняю команду "createsuperuser" через manage.py task в Pycharm либо в консоли, вылетает ошибка
Traceback (most recent call last):
File "/home/camaro/programming/imedrese/master/manage.py", line 14, in <module>
execute_from_command_line(sys.argv)
File "/home/camaro/programming/imedrese/master/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/camaro/programming/imedrese/master/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/camaro/programming/imedrese/master/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 190, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/camaro/programming/imedrese/master/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 41, in load_command_class
return module.Command()
File "/home/camaro/programming/imedrese/master/local/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 28, in __init__
self.UserModel = get_user_model()
File "/home/camaro/programming/imedrese/master/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 155, in get_user_model
"AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings.AUTH_USER_MODEL
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'profile.Profile' that has not been installed
а если выполнить команду через дебаггер, то возвращается
Superuser creation skipped due to not running in a TTY. You can run `manage.py createsuperuser` in your project to create one manually.
залез в исходники команды.
https://github.com/django/django/blob/master/djang...
и закомментил строки 84 и 85:
if hasattr(self.stdin, 'isatty') and not self.stdin.isatty():
raise NotRunningInTTYException("Not running in a TTY")
В результате в дебагере создался суперюзер успешно.
В чем может быть проблема?
модельку юзера можно глянуть вот здесь (тот же вопрос)
Ошибка с кастомной моделью юзера на django 1.8?