#Yet Another Flask Boilerplate Repo.
###About
Flask is a micro framework, and this is a micro Flask setup.
The repo. contains just enough to get a new Flask app off the ground. No Bootstrap, no SQLAlchemy, etc.
I'm new to Flask and Python, and I wanted a decent starting point for new Flask apps, something where I understood all the moving parts.
The setup is mostly from the Package structure in Explore Flask, but some stuff was filled in from the Flask tutorial at Real Python.
###Project Structure
├── README.md
├── config.py (configuration that is not environment specific. Config values set in instance/config.py override those set in this config.py)
├── instance/ (config. that should not be in version control, e.g., sensitive creds. and/or environment specific variables like `DEBUG`)
│ └── config.py
├── requirements.txt
├── run.py (used only in development. Test site with `python run.py`. You need to modify the `import` statement around line 5 to match the name of the package)
└── yourappname/ (change to the name of your app)
├── __init__.py
├── forms.py
├── models.py
├── static/
| ├── img
│ ├── js
│ │ ├── main.js
│ │ └── vendors/
│ └── style
│ └── main.css
├── templates/
│ ├── home.html (very, very basic home page template)
│ └── layout.html (very basic layout file)
└── views.pySee Explore Flask for more setup possibilities.
###Setup
- Clone this repo
- Change package name directory (currently yourappname) to the name of your app
- Repeat for the
importstatement in run.py - Setup virtualenv for this directory & activate (because I always forget, virtualenvwrapper command is
mkvirtualenv <env-name>) - Create an
instance/dir containing aconfig.pyfile pip install -r requirements.txtpython run.py- Navigate to 127.0.0.1:5000 in your browser to test it out