diff options
| author | Steve Piercy <web@stevepiercy.com> | 2018-08-18 12:20:51 -0700 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2018-08-18 12:20:51 -0700 |
| commit | 74bb4c4171b09cf53467a6e2c576ea401aae1515 (patch) | |
| tree | 0436f457d030ec516c0a8a09c09c0101d8f212ad /docs | |
| parent | cc67279154e110edd2b1625066236921b8494ba4 (diff) | |
| download | pyramid-74bb4c4171b09cf53467a6e2c576ea401aae1515.tar.gz pyramid-74bb4c4171b09cf53467a6e2c576ea401aae1515.tar.bz2 pyramid-74bb4c4171b09cf53467a6e2c576ea401aae1515.zip | |
Clean up code-blocks in qt/more_view_classes
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/quick_tutorial/more_view_classes.rst | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/docs/quick_tutorial/more_view_classes.rst b/docs/quick_tutorial/more_view_classes.rst index 30234ea2e..9caf0f36f 100644 --- a/docs/quick_tutorial/more_view_classes.rst +++ b/docs/quick_tutorial/more_view_classes.rst @@ -57,63 +57,63 @@ Steps .. code-block:: bash - $ cd ..; cp -r templating more_view_classes; cd more_view_classes - $ $VENV/bin/pip install -e . + cd ..; cp -r templating more_view_classes; cd more_view_classes + $VENV/bin/pip install -e . #. Our route in ``more_view_classes/tutorial/__init__.py`` needs some replacement patterns: .. literalinclude:: more_view_classes/tutorial/__init__.py - :linenos: + :linenos: #. Our ``more_view_classes/tutorial/views.py`` now has a view class with several views: .. literalinclude:: more_view_classes/tutorial/views.py - :linenos: + :linenos: #. Our primary view needs a template at ``more_view_classes/tutorial/home.pt``: .. literalinclude:: more_view_classes/tutorial/home.pt - :language: html + :language: html #. Ditto for our other view from the previous section at ``more_view_classes/tutorial/hello.pt``: .. literalinclude:: more_view_classes/tutorial/hello.pt - :language: html + :language: html #. We have an edit view that also needs a template at ``more_view_classes/tutorial/edit.pt``: .. literalinclude:: more_view_classes/tutorial/edit.pt - :language: html + :language: html #. And finally the delete view's template at ``more_view_classes/tutorial/delete.pt``: .. literalinclude:: more_view_classes/tutorial/delete.pt - :language: html + :language: html #. Our tests in ``more_view_classes/tutorial/tests.py`` fail, so let's modify them: .. literalinclude:: more_view_classes/tutorial/tests.py - :linenos: + :linenos: #. Now run the tests: .. code-block:: bash - $ $VENV/bin/py.test tutorial/tests.py -q - .. - 2 passed in 0.40 seconds + $VENV/bin/py.test tutorial/tests.py -q + .. + 2 passed in 0.40 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/howdy/jane/doe in your browser. Click the ``Save`` and ``Delete`` buttons, and watch the output in the console window. @@ -161,13 +161,13 @@ previously hardcoded the URLs, such as: .. code-block:: html - <a href="/howdy/jane/doe">Howdy</a> + <a href="/howdy/jane/doe">Howdy</a> In ``home.pt`` we switched to: .. code-block:: xml - <a href="${request.route_url('hello', first='jane', + <a href="${request.route_url('hello', first='jane', last='doe')}">form</a> Pyramid has rich facilities to help generate URLs in a flexible, non-error |
