2015-01-21 08:32:17 -08:00
|
|
|
# Flask Skeleton
|
|
|
|
|
2015-01-21 08:35:34 -08:00
|
|
|
Flask starter project...
|
2015-01-21 08:32:17 -08:00
|
|
|
|
2015-01-21 08:36:54 -08:00
|
|
|
[![Build Status](https://travis-ci.org/realpython/flask-skeleton.svg?branch=master)](https://travis-ci.org/realpython/flask-skeleton)
|
|
|
|
|
2015-11-06 12:29:52 -08:00
|
|
|
[![Coverage Status](https://coveralls.io/repos/realpython/flask-skeleton/badge.svg?branch=master&service=github)](https://coveralls.io/github/realpython/flask-skeleton?branch=master)
|
|
|
|
|
2015-01-21 08:32:17 -08:00
|
|
|
## Quick Start
|
|
|
|
|
2015-11-06 12:16:02 -08:00
|
|
|
### Basics
|
|
|
|
|
|
|
|
1. Activate a virtualenv
|
|
|
|
1. Install the requirements
|
|
|
|
|
2015-01-21 08:32:17 -08:00
|
|
|
### Set Environment Variables
|
|
|
|
|
2015-04-16 11:56:56 -07:00
|
|
|
Update *config.py*, and then run:
|
2015-01-21 08:32:17 -08:00
|
|
|
|
|
|
|
```sh
|
2015-04-16 11:56:56 -07:00
|
|
|
$ export APP_SETTINGS="project.config.DevelopmentConfig"
|
2015-01-21 08:32:17 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
```sh
|
2015-04-16 15:47:07 -07:00
|
|
|
$ export APP_SETTINGS="project.config.ProductionConfig"
|
2015-01-21 08:32:17 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
### Create DB
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ python manage.py create_db
|
|
|
|
$ python manage.py db init
|
|
|
|
$ python manage.py db migrate
|
|
|
|
$ python manage.py create_admin
|
|
|
|
$ python manage.py create_data
|
|
|
|
```
|
|
|
|
|
|
|
|
### Run the Application
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ python manage.py runserver
|
|
|
|
```
|
2015-01-22 15:18:43 -08:00
|
|
|
|
|
|
|
### Testing
|
|
|
|
|
|
|
|
Without coverage:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ python manage.py test
|
|
|
|
```
|
|
|
|
|
|
|
|
With coverage:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ python manage.py cov
|
|
|
|
```
|