Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loggining in [Class '<class 'app.models.User'>' has no field 'username'."] #28

Open
OneVoltTen opened this issue Mar 7, 2017 · 1 comment

Comments

@OneVoltTen
Copy link

After submitting user login it displays the following error:
screenshot_2017-03-07_17-59-11

@hosek
Copy link

hosek commented Mar 23, 2017

I've got same error.
Add username field to the model:
models.py:28
username = db.Column(db.Unicode(50), nullable=False, server_default=u'')
and fill it in manage_commands.py:49
user = User(email=email, first_name=first_name, username=first_name,
(you may need to keep username separated from first name, I just used first name for simplicity)

then delete app.sqlite from the root and recreate DB with python manage.py init_db
Now you will be able to login with default Admin/Password1

Hope that help you a little

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants