summaryrefslogtreecommitdiff
path: root/docs/quick_tour.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2019-12-25 03:35:14 -0800
committerSteve Piercy <web@stevepiercy.com>2020-01-02 23:30:59 -0800
commit94fd8de4263dc6294aa62425a5f98d905ef0584a (patch)
treeda1ca3fbd3f57748663e7a2b43061de52de7c282 /docs/quick_tour.rst
parentcc396692d82441f8142fb14041542ebd2dad6f0a (diff)
downloadpyramid-94fd8de4263dc6294aa62425a5f98d905ef0584a.tar.gz
pyramid-94fd8de4263dc6294aa62425a5f98d905ef0584a.tar.bz2
pyramid-94fd8de4263dc6294aa62425a5f98d905ef0584a.zip
Update quick_tour with cookiecutter master branch
Diffstat (limited to 'docs/quick_tour.rst')
-rw-r--r--docs/quick_tour.rst22
1 files changed, 18 insertions, 4 deletions
diff --git a/docs/quick_tour.rst b/docs/quick_tour.rst
index a428a77c3..e6914337f 100644
--- a/docs/quick_tour.rst
+++ b/docs/quick_tour.rst
@@ -493,7 +493,8 @@ So far we have done all of our *Quick Tour* as a single Python file. No Python
packages, no structure. Most Pyramid projects, though, aren't developed this
way.
-To ease the process of getting started, the Pylons Project provides a :term:`cookiecutter` that generates sample Pyramid projects from project templates. This cookiecutter will install Pyramid and its dependencies as well.
+To ease the process of getting started, the Pylons Project provides a :term:`cookiecutter` that generates a sample Pyramid project from project templates.
+This cookiecutter will install Pyramid and its dependencies as well.
First you'll need to install cookiecutter.
@@ -894,9 +895,22 @@ We then run through the following commands as before.
# Reset our environment variable for a new virtual environment.
export VENV=~/sqla_demo/env
-We now have a working sample SQLAlchemy application with all dependencies
-installed. The sample project provides a console script to initialize a SQLite
-database with tables. Let's run it, then start the application:
+We now have a working sample SQLAlchemy application with all dependencies installed.
+The sample project provides a method to generate a database migration from existing models and upgrade the database schema using Alembic.
+Let's generate the first revision.
+
+.. code-block:: bash
+
+ $VENV/bin/alembic -c development.ini revision --autogenerate -m "init"
+
+Now let's upgrade the database schema.
+
+.. code-block:: bash
+
+ $VENV/bin/alembic -c development.ini upgrade head
+
+The sample project also provides a console script to load data into the SQLite database.
+Let's run it, then start the application:
.. code-block:: bash