summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-08-18 12:26:07 -0700
committerSteve Piercy <web@stevepiercy.com>2018-08-18 12:26:07 -0700
commit78c485f0a81bdd7aebe75b167e638fd863287396 (patch)
treefad4b5597b7538a4ab315958fa5eaf3927987807 /docs
parent482cc914f0593c5747d3b14999436f4ae3368fc6 (diff)
downloadpyramid-78c485f0a81bdd7aebe75b167e638fd863287396.tar.gz
pyramid-78c485f0a81bdd7aebe75b167e638fd863287396.tar.bz2
pyramid-78c485f0a81bdd7aebe75b167e638fd863287396.zip
Clean up code-blocks in qt/templating
Diffstat (limited to 'docs')
-rw-r--r--docs/quick_tutorial/templating.rst24
1 files changed, 12 insertions, 12 deletions
diff --git a/docs/quick_tutorial/templating.rst b/docs/quick_tutorial/templating.rst
index ec6de98f8..3fbef699c 100644
--- a/docs/quick_tutorial/templating.rst
+++ b/docs/quick_tutorial/templating.rst
@@ -47,60 +47,60 @@ Steps
.. code-block:: bash
- $ cd ..; cp -r views templating; cd templating
+ cd ..; cp -r views templating; cd templating
#. This step depends on ``pyramid_chameleon``, so add it as a dependency in
``templating/setup.py``:
.. literalinclude:: templating/setup.py
- :linenos:
+ :linenos:
#. Now we can activate the development-mode distribution:
.. code-block:: bash
- $ $VENV/bin/pip install -e .
+ $VENV/bin/pip install -e .
#. We need to connect ``pyramid_chameleon`` as a renderer by making a call in
the setup of ``templating/tutorial/__init__.py``:
.. literalinclude:: templating/tutorial/__init__.py
- :linenos:
+ :linenos:
#. Our ``templating/tutorial/views.py`` no longer has HTML in it:
.. literalinclude:: templating/tutorial/views.py
- :linenos:
+ :linenos:
#. Instead we have ``templating/tutorial/home.pt`` as a template:
.. literalinclude:: templating/tutorial/home.pt
- :language: html
+ :language: html
#. For convenience, change ``templating/development.ini`` to reload templates
automatically with ``pyramid.reload_templates``:
.. literalinclude:: templating/development.ini
- :language: ini
+ :language: ini
#. Our unit tests in ``templating/tutorial/tests.py`` can focus on data:
.. literalinclude:: templating/tutorial/tests.py
- :linenos:
+ :linenos:
#. Now run the tests:
.. code-block:: bash
- $ $VENV/bin/py.test tutorial/tests.py -q
- ....
- 4 passed in 0.46 seconds
+ $VENV/bin/py.test tutorial/tests.py -q
+ ....
+ 4 passed in 0.46 seconds
#. Run your Pyramid application with:
.. code-block:: bash
- $ $VENV/bin/pserve development.ini --reload
+ $VENV/bin/pserve development.ini --reload
#. Open http://localhost:6543/ and http://localhost:6543/howdy in your browser.