(Oct-24-2019, 05:08 AM)snippsat Wrote:(Oct-24-2019, 03:51 AM)darktitan Wrote: My app.py looks like thisThen you don't needdb_setup.py
at all,it's maybe confusing because he mixing this stuff together in tutorial.
He do mention this.
Mike Driscoll Wrote:You will note that Flask-SQLAlchemy doesn’t require all the imports that just plain SQLAlchemy required.
All we need is the db object we created in our app script.
Nice to know. I did the modification needed and removed SQLAlchemy but im still got same problem as before. I cant save the changes i do to the account. and im not getting any error on my stationary computer. In console i can see the POST but nothing more. And when i enter the db file nothing have changed. Funny thing is i use almost the identical code in another thing in an another table in the db and it works the changes gets saved and i get redirected to another page.
eureka
I hade put FlaskForm instead of Form In my Form for the page
class UserForm(Form): user = StringField('Användarnamn:', validators=[DataRequired()]) password = StringField('Lösenord:', validators=[DataRequired()]) urole = StringField('Användar Behörighet:', validators=[DataRequired()]) owner = StringField('Användar namn:', validators=[DataRequired()])Got it to work now.