|
|
|
@ -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 |
|
|
|
|
|
|
|
|
|