When I try to create an initial database for my Django app using manage.py
syncdb
, it crashes at the point where I'm about to create the super user, after entering the email address:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/getpass.py", line 114, in fallback_getpass
stacklevel=2)
getpass.GetPassWarning: Can not control echo on the terminal.
What I've tried to solve this:
Skipping the creation of the super user during
syncdb
and run thecreatesupercommand
. This appears to solve the problem as there is a superuser created however it's impossible to log in to theadmin site
with that user id and password.Deleting and recreating the database.
Double checked the user profile in the database: user name, password, is_staff, is_active all have the correct values.
Debugged the process until I actually see the correct user name and password being passed into the
authenticate
function.Checked database encoding which is set to UTF-8.
I use Django 1.6.5, Pycharm and MySQL. The whole thing is rather baffling as my other projects with identical setup work flawless.
Any ideas as to what might be causing this?
EDIT: Apparently during the botched superuser creation, Django somehow marks the password as being unusable (which is impossible to detect as the hash is stored in the db and uninterpretable for humans). I managed to circumvent this by creating a password hash outside the Django environment and pasting that in the database. At least it allows me to login now. Problem not yet solved though...