summaryrefslogtreecommitdiff
path: root/docs/quick_tutorial/templating.rst
diff options
context:
space:
mode:
authorMichael Merickel <github@m.merickel.org>2018-08-21 01:44:55 -0500
committerGitHub <noreply@github.com>2018-08-21 01:44:55 -0500
commit820a752645b460ea8009b07a75c752ab09c53dec (patch)
tree14616d81a7abedfe523c057e71ed7b2aca680754 /docs/quick_tutorial/templating.rst
parentdf8598a2658632f709a64e8076cce02ca49de8e6 (diff)
parent254710cb716dccfe536b20d077e3cb79be19c6b3 (diff)
downloadpyramid-820a752645b460ea8009b07a75c752ab09c53dec.tar.gz
pyramid-820a752645b460ea8009b07a75c752ab09c53dec.tar.bz2
pyramid-820a752645b460ea8009b07a75c752ab09c53dec.zip
Merge pull request #3330 from stevepiercy/docs-code-style
Docs code style
Diffstat (limited to 'docs/quick_tutorial/templating.rst')
-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.