summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki/design.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-11-23 15:05:19 -0800
committerSteve Piercy <web@stevepiercy.com>2018-11-23 15:05:19 -0800
commit4fe2cc396fbfdfb6af78de6dd9190279a6638a19 (patch)
treeb26fc338242f5f9e483c9140247cce5e9c477f6a /docs/tutorials/wiki/design.rst
parent8f6b195b3f1e1f1f2f16e09902540ece823e9cc9 (diff)
downloadpyramid-4fe2cc396fbfdfb6af78de6dd9190279a6638a19.tar.gz
pyramid-4fe2cc396fbfdfb6af78de6dd9190279a6638a19.tar.bz2
pyramid-4fe2cc396fbfdfb6af78de6dd9190279a6638a19.zip
Correct grammar, use shorter sentences, rewrap to one sentence per line.
Diffstat (limited to 'docs/tutorials/wiki/design.rst')
-rw-r--r--docs/tutorials/wiki/design.rst96
1 files changed, 42 insertions, 54 deletions
diff --git a/docs/tutorials/wiki/design.rst b/docs/tutorials/wiki/design.rst
index 30d443bb8..5c86293f6 100644
--- a/docs/tutorials/wiki/design.rst
+++ b/docs/tutorials/wiki/design.rst
@@ -4,85 +4,77 @@
Design
======
-Following is a quick overview of the design of our wiki application, to help
-us understand the changes that we will be making as we work through the
-tutorial.
+Following is a quick overview of the design of our wiki application to help us understand the changes that we will make as we work through the tutorial.
+
Overall
-------
-We choose to use :term:`reStructuredText` markup in the wiki text. Translation
-from reStructuredText to HTML is provided by the widely used ``docutils``
-Python module. We will add this module in the dependency list on the project
-``setup.py`` file.
+We choose to use :term:`reStructuredText` markup in the wiki text.
+Conversion from reStructuredText to HTML is provided by the widely used ``docutils`` Python module.
+We will add this module in the dependency list on the project ``setup.py`` file.
+
Models
------
-The root resource named ``Wiki`` will be a mapping of wiki page
-names to page resources. The page resources will be instances
-of a *Page* class and they store the text content.
+The root resource named ``Wiki`` will be a mapping of wiki page names to page resources.
+The page resources will be instances of a *Page* class.
+They store the text content.
+
+URLs like ``/PageName`` will be traversed using Wiki[ *PageName* ] => page.
+The resulting context is the page resource of an existing page.
-URLs like ``/PageName`` will be traversed using Wiki[
-*PageName* ] => page, and the context that results is the page
-resource of an existing page.
+To add a page to the wiki, a new instance of the page resource is created.
+Its name and reference are added to the Wiki mapping.
-To add a page to the wiki, a new instance of the page resource
-is created and its name and reference are added to the Wiki
-mapping.
+A page named ``FrontPage`` containing the text *This is the front page* will be created when the storage is initialized.
+It will be used as the wiki home page.
-A page named ``FrontPage`` containing the text *This is the front page*, will
-be created when the storage is initialized, and will be used as the wiki home
-page.
Views
-----
-There will be three views to handle the normal operations of adding,
-editing, and viewing wiki pages, plus one view for the wiki front page.
-Two templates will be used, one for viewing, and one for both adding
-and editing wiki pages.
+There will be three views to handle the normal operations of adding, editing, and viewing wiki pages, plus one view for the wiki front page.
+Two templates will be used, one for viewing, and one for both adding and editing wiki pages.
-As of version 1.5 :app:`Pyramid` no longer ships with templating systems. In this tutorial, we will use :term:`Chameleon`. Chameleon is a variant of :term:`ZPT`, which is an XML-based templating language.
+As of version 1.5 :app:`Pyramid` no longer ships with templating systems.
+In this tutorial we will use :term:`Chameleon`.
+Chameleon is a variant of :term:`ZPT`, which is an XML-based templating language.
Security
--------
-We'll eventually be adding security to our application. The components we'll
-use to do this are below.
+We'll eventually add security to our application.
+The components we'll use to do this are below.
-- USERS, a dictionary mapping :term:`userids <userid>` to their
- corresponding passwords.
+- USERS, a dictionary mapping :term:`userids <userid>` to their corresponding passwords.
-- GROUPS, a dictionary mapping :term:`userids <userid>` to a
- list of groups to which they belong.
+- GROUPS, a dictionary mapping :term:`userids <userid>` to a list of groups to which they belong.
-- ``groupfinder``, an *authorization callback* that looks up USERS and
- GROUPS. It will be provided in a new ``security.py`` file.
+- ``groupfinder``, an *authorization callback* that looks up USERS and GROUPS.
+ It will be provided in a new ``security.py`` file.
-- An :term:`ACL` is attached to the root :term:`resource`. Each row below
- details an :term:`ACE`:
+- An :term:`ACL` is attached to the root :term:`resource`.
+ Each row below details an :term:`ACE`:
- +----------+----------------+----------------+
- | Action | Principal | Permission |
- +==========+================+================+
- | Allow | Everyone | View |
- +----------+----------------+----------------+
- | Allow | group:editors | Edit |
- +----------+----------------+----------------+
+ +----------+----------------+----------------+
+ | Action | Principal | Permission |
+ +==========+================+================+
+ | Allow | Everyone | View |
+ +----------+----------------+----------------+
+ | Allow | group:editors | Edit |
+ +----------+----------------+----------------+
-- Permission declarations are added to the views to assert the security
- policies as each request is handled.
+- Permission declarations are added to the views to assert the security policies as each request is handled.
-Two additional views and one template will handle the login and
-logout tasks.
+Two additional views and one template will handle the login and logout tasks.
Summary
-------
-The URL, context, actions, template and permission associated to each view are
-listed in the following table:
+The URL, context, actions, template and permission associated to each view are listed in the following table:
+----------------------+-------------+-----------------+-----------------------+------------+------------+
| URL | View | Context | Action | Template | Permission |
@@ -139,10 +131,6 @@ listed in the following table:
| | | | /FrontPage | | |
+----------------------+-------------+-----------------+-----------------------+------------+------------+
-.. [1] This is the default view for a Page context
- when there is no view name.
-.. [2] Pyramid will return a default 404 Not Found page
- if the page *PageName* does not exist yet.
-.. [3] ``pyramid.exceptions.Forbidden`` is reached when a
- user tries to invoke a view that is
- not authorized by the authorization policy.
+.. [1] This is the default view for a Page context when there is no view name.
+.. [2] Pyramid will return a default 404 Not Found page if the page *PageName* does not exist yet.
+.. [3] ``pyramid.exceptions.Forbidden`` is reached when a user tries to invoke a view that is not authorized by the authorization policy.