diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2013-01-16 13:41:01 +0200 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2013-01-16 13:41:01 +0200 |
| commit | 836339057be73d49cb914977db5e35e40c0c843e (patch) | |
| tree | 6437f2be7f76ed492c505fdc438938e78f9f2351 /README.md | |
| parent | e9bd119b68fb861865013bf925d968e15ae8ae01 (diff) | |
Update README
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 41 |
1 files changed, 31 insertions, 10 deletions
@@ -1,13 +1,34 @@ -Heroky Python Skeleton -====================== +# Heroky Python Skeleton -This repository has all the base files ready for deploying a Heroku application. +This repository has all the base files ready for deploying a Heroku application, including a simple database model managed with flask-sqlalchemy. -Usage ------ +## Usage - - `git clone https://github.com/yuvadm/heroku-python-skeleton.git` - - `cd heroku-python-skeleton` - - `heroku create` - - `heroku addons:add heroku-postgresql:dev` - - `git push heroku master` +### Initial + +```bash +$ git clone https://github.com/yuvadm/heroku-python-skeleton.git +$ cd heroku-python-skeleton +$ heroku create +$ git push heroku master +``` + +### Database + +```bash +$ heroku addons:add heroku-postgresql:dev +-----> Adding heroku-postgresql:dev to some-app-name... done, v196 (free) +Attached as HEROKU_POSTGRESQL_COLOR +Database has been created and is available +$ heroku pg:promote HEROKU_POSTGRESQL_COLOR +$ heroku run python +``` + +and in the Python REPL: + +```python +>>> from app import db +>>> db.create_all() +``` + +For a detailed introduction see [http://blog.y3xz.com/blog/2012/08/16/flask-and-postgresql-on-heroku/](http://blog.y3xz.com/blog/2012/08/16/flask-and-postgresql-on-heroku/). |
