move autoapp to project root, update readme, update travis file

master
Jeremy Epstein 8 years ago
parent db0246de90
commit 1f9ef5ba78
  1. 4
      {{cookiecutter.app_name}}/.travis.yml
  2. 31
      {{cookiecutter.app_name}}/README.rst
  3. 0
      {{cookiecutter.app_name}}/autoapp.py

@ -7,5 +7,5 @@ python:
- 3.4
- 3.5
install: pip install -r requirements/dev.txt
before_script: python manage.py lint
script: python manage.py test
before_script: flask lint
script: flask test

@ -14,38 +14,31 @@ First, set your app's secret key as an environment variable. For example, exampl
export {{cookiecutter.app_name | upper}}_SECRET='something-really-secret'
Before running shell commands, set the ``FLASK_APP`` environment variable ::
Then run the following commands to bootstrap your environment.
export FLASK_APP=/path/to/autoapp.py
::
Then run the following commands to bootstrap your environment ::
git clone https://github.com/{{cookiecutter.github_username}}/{{cookiecutter.app_name}}
cd {{cookiecutter.app_name}}
pip install -r requirements/dev.txt
bower install
python manage.py server
flask run
You will see a pretty welcome screen.
Once you have installed your DBMS, run the following to create your app's database tables and perform the initial migration:
::
python manage.py db init
python manage.py db migrate
python manage.py db upgrade
python manage.py server
Once you have installed your DBMS, run the following to create your app's database tables and perform the initial migration ::
flask db init
flask db migrate
flask db upgrade
flask run
Deployment
----------
Before running shell commands, set the ``FLASK_APP`` environment variable ::
export FLASK_APP="{{cookiecutter.app_name}}.autoapp"
In your production environment, make sure the ``{{cookiecutter.app_name|upper}}_ENV`` environment variable is set to ``"prod"``.
@ -70,13 +63,11 @@ To run all tests, run ::
Migrations
----------
Whenever a database migration needs to be made. Run the following commands:
::
Whenever a database migration needs to be made. Run the following commands ::
flask db migrate
This will generate a new migration script. Then run:
::
This will generate a new migration script. Then run ::
flask db upgrade

Loading…
Cancel
Save