23460542 / CITS3403_GroupProject

0 stars 0 forks source link

Flask shell not working #11

Open HossainEshan opened 2 weeks ago

HossainEshan commented 2 weeks ago

In my branch, the flask shell is not properly importing modules. I will move back a few commits and try to fix this issue.

HossainEshan commented 2 weeks ago

I wasn't able to fix the issue. For now when using flask shell please manually import modules import sqlalchemy as sa import sqlalchemy.orm as so from app import app, db from app.models import User, Post, Comment

23460542 commented 2 weeks ago

Just pushed a commit which just installed the modules with pip inside of virtual environment instead of using flask shell. Tell me if it's fixed and if so we can close the issue.

HossainEshan commented 2 weeks ago

I cloned the latest commit and tested. The issue is still there. I have attached a screenshot to show what exactly is going on. For reasons unknown, the shell seems to import everything but sa and so even though the flask shell context (in app.py) dictionary defines these libraries.

image