heroku-basic-flask | Example of deploying a Python Flask | Platform As A Service library
kandi X-RAY | heroku-basic-flask Summary
kandi X-RAY | heroku-basic-flask Summary
Example of deploying a Python Flask app onto Heroku
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Renders a homepage .
heroku-basic-flask Key Features
heroku-basic-flask Examples and Code Snippets
Community Discussions
Trending Discussions on heroku-basic-flask
QUESTION
I am following this guide to deploy a python flask application on heroku: https://github.com/datademofun/heroku-basic-flask
I setup my environment by this guide: http://docs.python-guide.org/en/latest/dev/virtualenvs/
The problem is that my custom module (platforms/hitta.py) fail to import when running the application with gunicorn instead of just python3 app.py. Why is there a difference and how do I solve this?
I have only problem importing my own modules, not from requirements.txt:
...ANSWER
Answered 2018-Jul-13 at 02:37You need to create a __init__.py
in a folder to make it become a Python package, then you can import modules inside it with from platforms.hitta import Hitta
. The file structure may like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install heroku-basic-flask
This part will be a little confusing. Heroku deploys using git -- which is not to be confused with Github. (Hopefully, you have git installed at this point.). Basically, this means before we can deploy to Heroku, we need to create a git repo in our app, add the files, and commit them. But we don't need to push them onto a Github repo if we don't want to.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page