Importing files in DIR with flask

Following microblog tutorial on Flask:

In Pycharm, no matter how I structure or name the files, I cannot get the dev server to run if I separate the code and import the files. I also can't get it to inherit the codes no matter where I move the init, views, run files. The only way for me to get the server to run is to have all the commands execute on the same file. What am I doing wrong?

I have it setup as: Project 1 > app(directory) > tmp(directory) >

app(directory) > static(directory) > templates(directory) > > (I have tried different arrangements.)

Inside from app import app

Inside from app import app

Inside from flask import Flask from app import views

(I have tried many different combinations such as from app import app.views. from app import views as app_views. I have also tried renaming the directories/files, nothing is working.)

Please sign in to leave a comment.