Answer the question
In order to leave comments, you need to log in
Problem running createsuperuser command?
I execute the command "createsuperuser" via manage.py task in Pycharm or in the console, an error occurs
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.
if hasattr(self.stdin, 'isatty') and not self.stdin.isatty():
raise NotRunningInTTYException("Not running in a TTY")
Answer the question
In order to leave comments, you need to log in
Usually, in this case, dzhanga looks into the settings and expects to receive such a string there:
AUTH_USER_MODEL = 'users.User'
Which actually points to a customized user. Use :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question