From 6b6d0e4c2b4e56523bd41aefd9d462858e03f443 Mon Sep 17 00:00:00 2001 From: Stephen Martin Date: Sun, 9 Sep 2018 17:05:27 -0700 Subject: merging cookiecutters --- docs/quick_tutorial/cookiecutters.rst | 24 ++++++++++++++++++++---- docs/quick_tutorial/databases.rst | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) (limited to 'docs/quick_tutorial') diff --git a/docs/quick_tutorial/cookiecutters.rst b/docs/quick_tutorial/cookiecutters.rst index 045808884..dee301a12 100644 --- a/docs/quick_tutorial/cookiecutters.rst +++ b/docs/quick_tutorial/cookiecutters.rst @@ -24,17 +24,17 @@ Steps $VENV/bin/pip install cookiecutter -#. Let's use the cookiecutter ``pyramid-cookiecutter-starter`` to create a starter :app:`Pyramid` project in the current directory, entering values at the prompts as shown below for the following command. +#. Let's use the cookiecutter ``pyramid-cookiecutter-theonecc`` to create a starter :app:`Pyramid` project in the current directory, entering values at the prompts as shown below for the following command. .. code-block:: bash - $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-theonecc --checkout master If prompted for the first item, accept the default ``yes`` by hitting return. .. code-block:: text - You've cloned ~/.cookiecutters/pyramid-cookiecutter-starter before. + You've cloned ~/.cookiecutters/pyramid-cookiecutter-theonecc before. Is it okay to delete and re-clone it? [yes]: yes project_name [Pyramid Scaffold]: cc_starter repo_name [cc_starter]: cc_starter @@ -43,6 +43,11 @@ Steps 2 - chameleon 3 - mako Choose from 1, 2, 3 [1]: 1 + Select backend: + 1 - none + 2 - sqlalchemy + 3 - zodb + Choose from 1, 2, 3 [1]: 1 #. We then run through the following commands. @@ -57,6 +62,17 @@ Steps # ...and into which we install our project. env/bin/pip install -e . + **Note:** If you selected ``sqlalchemy`` in the preceding step, continue. Otherwise, skip to the next step. + + .. code-block:: bash + + # Generate your first revision. + env/bin/alembic -c development.ini revision --autogenerate -m "init" + # Upgrade to that revision. + env/bin/alembic -c development.ini upgrade head + # Load default data. + env/bin/initialize_cc_starter_db development.ini + #. Start up the application by pointing :app:`Pyramid`'s ``pserve`` command at the project's (generated) configuration file: @@ -79,7 +95,7 @@ Analysis ======== Rather than starting from scratch, a cookiecutter can make it easy to get a Python -project containing a working :app:`Pyramid` application. The Pylons Project provides `several cookiecutters `_. +project containing a working :app:`Pyramid` application. ``pserve`` is :app:`Pyramid`'s application runner, separating operational details from your code. When you install :app:`Pyramid`, a small command program called ``pserve`` diff --git a/docs/quick_tutorial/databases.rst b/docs/quick_tutorial/databases.rst index 7d10f2470..7d28f4ba2 100644 --- a/docs/quick_tutorial/databases.rst +++ b/docs/quick_tutorial/databases.rst @@ -21,7 +21,7 @@ storage and retrieval for the wiki pages in the previous step. .. note:: - The ``pyramid-cookiecutter-alchemy`` cookiecutter is really helpful for getting an SQLAlchemy + The Pyramid cookiecutter is really helpful for getting an SQLAlchemy project going, including generation of the console script. Since we want to see all the decisions, we will forgo convenience in this tutorial, and wire it up ourselves. -- cgit v1.2.3 From f2520e5910861beac0199aa424ba282f856f79b3 Mon Sep 17 00:00:00 2001 From: Stephen Martin Date: Sun, 16 Sep 2018 15:46:31 -0700 Subject: doc fixes --- docs/quick_tutorial/cookiecutters.rst | 13 +------------ docs/quick_tutorial/databases.rst | 8 ++++---- 2 files changed, 5 insertions(+), 16 deletions(-) (limited to 'docs/quick_tutorial') diff --git a/docs/quick_tutorial/cookiecutters.rst b/docs/quick_tutorial/cookiecutters.rst index dee301a12..9734c36bc 100644 --- a/docs/quick_tutorial/cookiecutters.rst +++ b/docs/quick_tutorial/cookiecutters.rst @@ -4,7 +4,7 @@ Prelude: Quick Project Startup with Cookiecutters ================================================= -To ease the process of getting started on a project, the Pylons Project provides :term:`cookiecutter`\ s that generate sample :app:`Pyramid` projects from project templates. These cookiecutters will install :app:`Pyramid` and its dependencies as well. We will still cover many topics of web application development using :app:`Pyramid`, but it's good to know of this facility. This prelude will demonstrate how to get a working :app:`Pyramid` web application running via ``cookiecutter``. +To ease the process of getting started on a project, the Pylons Project provides a :term:`cookiecutter` that generates sample :app:`Pyramid` projects from project templates. The cookiecutter will install :app:`Pyramid` and its dependencies as well. We will still cover many topics of web application development using :app:`Pyramid`, but it's good to know of this facility. This prelude will demonstrate how to get a working :app:`Pyramid` web application running via ``cookiecutter``. Objectives @@ -62,17 +62,6 @@ Steps # ...and into which we install our project. env/bin/pip install -e . - **Note:** If you selected ``sqlalchemy`` in the preceding step, continue. Otherwise, skip to the next step. - - .. code-block:: bash - - # Generate your first revision. - env/bin/alembic -c development.ini revision --autogenerate -m "init" - # Upgrade to that revision. - env/bin/alembic -c development.ini upgrade head - # Load default data. - env/bin/initialize_cc_starter_db development.ini - #. Start up the application by pointing :app:`Pyramid`'s ``pserve`` command at the project's (generated) configuration file: diff --git a/docs/quick_tutorial/databases.rst b/docs/quick_tutorial/databases.rst index 7d28f4ba2..3082dc4d2 100644 --- a/docs/quick_tutorial/databases.rst +++ b/docs/quick_tutorial/databases.rst @@ -21,10 +21,10 @@ storage and retrieval for the wiki pages in the previous step. .. note:: - The Pyramid cookiecutter is really helpful for getting an SQLAlchemy - project going, including generation of the console script. Since we want to - see all the decisions, we will forgo convenience in this tutorial, and wire - it up ourselves. + The Pyramid cookiecutter ``pyramid-cookiecutter-theonecc`` is really + helpful for getting a SQLAlchemy project going, including generation of + the console script. Since we want to see all the decisions, we will forgo + convenience in this tutorial, and wire it up ourselves. Objectives -- cgit v1.2.3 From 28e688f1a41215cb6167f8e53de017ddb82b552f Mon Sep 17 00:00:00 2001 From: Stephen Martin Date: Mon, 17 Sep 2018 13:49:04 -0700 Subject: name change --- docs/quick_tutorial/cookiecutters.rst | 6 +++--- docs/quick_tutorial/databases.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/quick_tutorial') diff --git a/docs/quick_tutorial/cookiecutters.rst b/docs/quick_tutorial/cookiecutters.rst index 9734c36bc..e4a585a33 100644 --- a/docs/quick_tutorial/cookiecutters.rst +++ b/docs/quick_tutorial/cookiecutters.rst @@ -24,17 +24,17 @@ Steps $VENV/bin/pip install cookiecutter -#. Let's use the cookiecutter ``pyramid-cookiecutter-theonecc`` to create a starter :app:`Pyramid` project in the current directory, entering values at the prompts as shown below for the following command. +#. Let's use the cookiecutter ``pyramid-cookiecutter-starter`` to create a starter :app:`Pyramid` project in the current directory, entering values at the prompts as shown below for the following command. .. code-block:: bash - $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-theonecc --checkout master + $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master If prompted for the first item, accept the default ``yes`` by hitting return. .. code-block:: text - You've cloned ~/.cookiecutters/pyramid-cookiecutter-theonecc before. + You've cloned ~/.cookiecutters/pyramid-cookiecutter-starter before. Is it okay to delete and re-clone it? [yes]: yes project_name [Pyramid Scaffold]: cc_starter repo_name [cc_starter]: cc_starter diff --git a/docs/quick_tutorial/databases.rst b/docs/quick_tutorial/databases.rst index 3082dc4d2..2e656f565 100644 --- a/docs/quick_tutorial/databases.rst +++ b/docs/quick_tutorial/databases.rst @@ -21,7 +21,7 @@ storage and retrieval for the wiki pages in the previous step. .. note:: - The Pyramid cookiecutter ``pyramid-cookiecutter-theonecc`` is really + The Pyramid cookiecutter ``pyramid-cookiecutter-starter`` is really helpful for getting a SQLAlchemy project going, including generation of the console script. Since we want to see all the decisions, we will forgo convenience in this tutorial, and wire it up ourselves. -- cgit v1.2.3