summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-11-25 04:02:00 -0800
committerSteve Piercy <web@stevepiercy.com>2018-11-25 04:02:00 -0800
commit51c36cffdf86f22a3a50549f459fe4b8e500db94 (patch)
tree46b3bdbb16b4886b56ec5a9452771a1f7efc6410 /docs
parent890ecc61836cc2caddd9c5aeacd8e99880ec0237 (diff)
downloadpyramid-51c36cffdf86f22a3a50549f459fe4b8e500db94.tar.gz
pyramid-51c36cffdf86f22a3a50549f459fe4b8e500db94.tar.bz2
pyramid-51c36cffdf86f22a3a50549f459fe4b8e500db94.zip
Add section for notfound
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorials/wiki/definingviews.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/tutorials/wiki/definingviews.rst b/docs/tutorials/wiki/definingviews.rst
index 3194d2df7..81ef4f5c4 100644
--- a/docs/tutorials/wiki/definingviews.rst
+++ b/docs/tutorials/wiki/definingviews.rst
@@ -251,6 +251,21 @@ If the view execution *is* a result of a form submission (if the expression ``'f
It then redirects to the default view of the context (the page), which will always be the ``view_page`` view.
+Modifying the ``notfound_view`` in ``notfound.py``
+--------------------------------------------------
+
+We have one more view to modify.
+Open ``tutorial/views/notfound.py`` and make the changes shown by the emphasized lines.
+
+.. literalinclude:: src/views/tutorial/views/notfound.py
+ :linenos:
+ :language: python
+ :emphasize-lines: 3-4, 9-12
+
+We need to import the ``Page`` from our models.
+We eventually return a ``Page`` object as ``page`` into the template ``layout.pt`` to display its name in the title tag.
+
+
Adding templates
================