This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Take a look at my repo https://github.com/MustafaAdam/Blogr/tree/trying_blueprints
Is there anyway where I can define my 'app', 'db' and 'bcrypt' in the init.py of the site package.
Then in the run.py module I simply 'from site import app' and app.run() it?
I could not do that and faced a lovely variety of error messages related to imports and package.
I comprised and tried to do everything in the run.py module and then run everthing from there(as is shown in the repo). But importing the blueprints and the error handler kicked my ass again.
This time, python refused to acknowledge the 'utils' module of 'site' package and also refused to acknowledge that 'site' itself is a package?
"ImportError: No module named 'site.utils'; 'site' is not a package"
Doesn't the existance of a init.py in a directory makes it a packge?
Subreddit
Post Details
- Posted
- 8 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/flask/comme...