flasklogin-tutorial icon indicating copy to clipboard operation
flasklogin-tutorial copied to clipboard

Invalid __talename__ in models.py

Open morfyum opened this issue 3 years ago • 0 comments

Code is work well, when using flask, but you cant queary the database, when using - in table name.

So, rename flasklogin-users to flasklogin_users

PART:

class User(UserMixin, db.Model):
	"""User account model."""

	__tablename__ = 'flasklogin-users'
	id = db.Column(
		db.Integer,
		primary_key=True
	)

morfyum avatar Sep 19 '21 15:09 morfyum