- May 2, 2010
- 9,934
- 16,030
I have the following code:
The code is part of a MVC flask website setup, and I'm trying to convert from the preinstalled alchemy to MySQL remote db.
The error is with the models and columns. I'm not even sure this is what I should be doing to convert in the first place.
I also get the error message: ImportError: cannot import name 'User' from 'website.models'
Referring to the class User issues obviously.
Hoping someone with a bit of Python knowledge that has converted between the 2 versions of MySQL can help point me in the right direction.
Cheers
Python:
class User(db.Model, UserMixin):
userid = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(255), unique=True)
password = db.Column(db.String(255))
The code is part of a MVC flask website setup, and I'm trying to convert from the preinstalled alchemy to MySQL remote db.
The error is with the models and columns. I'm not even sure this is what I should be doing to convert in the first place.
I also get the error message: ImportError: cannot import name 'User' from 'website.models'
Referring to the class User issues obviously.
Hoping someone with a bit of Python knowledge that has converted between the 2 versions of MySQL can help point me in the right direction.
Cheers