From f9dd376581bdd4b45a28cfffafc2f08343f7c5d0 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 30 Apr 2015 03:34:13 -0700 Subject: correct view name --- docs/quick_tutorial/views.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/views.rst b/docs/quick_tutorial/views.rst index 529bba0a4..6728925fd 100644 --- a/docs/quick_tutorial/views.rst +++ b/docs/quick_tutorial/views.rst @@ -92,7 +92,7 @@ module ``views.py`` which is scanned via ``config.scan('.views')``. We have 2 views, each leading to the other. If you start at http://localhost:6543/, you get a response with a link to the next -view. The ``hello_view`` (available at the URL ``/howdy``) has a link +view. The ``hello`` view (available at the URL ``/howdy``) has a link back to the first view. This step also shows that the name appearing in the URL, -- cgit v1.2.3 From a4239799f7520729e395210ba4f69d57060d723b Mon Sep 17 00:00:00 2001 From: Areski Belaid Date: Fri, 1 May 2015 00:38:58 +0200 Subject: Update logging.rst The point 5 from this tutorial http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/logging.html mention that we should see a debug message. This appears before any needed changes in `development.ini`, thus this patch intend to change the order and add an extra point to put forward changes in the ini file. --- docs/quick_tutorial/logging.rst | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/logging.rst b/docs/quick_tutorial/logging.rst index e07d23d6d..82cfbe3c3 100644 --- a/docs/quick_tutorial/logging.rst +++ b/docs/quick_tutorial/logging.rst @@ -42,6 +42,12 @@ Steps .. literalinclude:: logging/tutorial/views.py :linenos: +#. Finally let's edit ``development.ini`` configuration file + to enable logging for our Pyramid application: + + .. literalinclude:: logging/development.ini + :language: ini + #. Make sure the tests still pass: .. code-block:: bash @@ -61,15 +67,10 @@ Steps Analysis ======== -Our ``development.ini`` configuration file wires up Python standard -logging for our Pyramid application: - -.. literalinclude:: logging/development.ini - :language: ini - -In this, our ``tutorial`` Python package is setup as a logger -and configured to log messages at a ``DEBUG`` or higher level. When you -visit http://localhost:6543 your console will now show:: +In our configuration file ``development.ini``, our ``tutorial`` Python +package is setup as a logger and configured to log messages at a +``DEBUG`` or higher level. When you visit http://localhost:6543 your +console will now show:: 2013-08-09 10:42:42,968 DEBUG [tutorial.views][MainThread] In home view -- cgit v1.2.3 From 6799b83daa8406168f0361b7550a8f7ea98bf373 Mon Sep 17 00:00:00 2001 From: Florian Klemme Date: Fri, 8 May 2015 13:56:41 +0200 Subject: Fixed minor highlighting mistake. There was just an apostrophe missing. --- docs/quick_tutorial/static_assets.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/static_assets.rst b/docs/quick_tutorial/static_assets.rst index 19d33f00f..3a7496ec7 100644 --- a/docs/quick_tutorial/static_assets.rst +++ b/docs/quick_tutorial/static_assets.rst @@ -25,7 +25,7 @@ Steps $ cd ..; cp -r view_classes static_assets; cd static_assets $ $VENV/bin/python setup.py develop -#. We add a call ``config.add_static_view in +#. We add a call ``config.add_static_view`` in ``static_assets/tutorial/__init__.py``: .. literalinclude:: static_assets/tutorial/__init__.py -- cgit v1.2.3 From de117d259b08c4a46dc67b5362cdd4db2e10dc97 Mon Sep 17 00:00:00 2001 From: Areski Belaid Date: Mon, 11 May 2015 16:52:17 +0200 Subject: Update authorization.rst fix the url for hello route '/howdy' --- docs/quick_tutorial/authorization.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/authorization.rst b/docs/quick_tutorial/authorization.rst index 6b10d3409..dc159234c 100644 --- a/docs/quick_tutorial/authorization.rst +++ b/docs/quick_tutorial/authorization.rst @@ -93,7 +93,7 @@ In summary: ``hello`` wants ``edit`` permission, ``Root`` says Of course, this only applies on ``Root``. Some other part of the site (a.k.a. *context*) might have a different ACL. -If you are not logged in and visit ``/hello``, you need to get +If you are not logged in and visit ``/howdy``, you need to get shown the login screen. How does Pyramid know what is the login page to use? We explicitly told Pyramid that the ``login`` view should be used by decorating the view with ``@forbidden_view_config``. -- cgit v1.2.3 From e560e5d365d559551385888d823a6068c6e093d3 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 16 May 2015 15:02:49 -0700 Subject: grammar fix --- docs/quick_tour.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tour.rst b/docs/quick_tour.rst index 41a0dc8c0..b94ae27ca 100644 --- a/docs/quick_tour.rst +++ b/docs/quick_tour.rst @@ -505,7 +505,7 @@ Let's look at ``pserve`` and configuration in more depth. Application Running with ``pserve`` =================================== -Prior to scaffolds, our project mixed a number of operations details +Prior to scaffolds, our project mixed a number of operational details into our code. Why should my main code care which HTTP server I want and what port number to run on? -- cgit v1.2.3 From 6268f5d65bc0e41d6213d4e4bf27e36c9334f684 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 16 May 2015 15:50:06 -0700 Subject: grammar fix --- docs/quick_tour.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tour.rst b/docs/quick_tour.rst index b94ae27ca..e71725406 100644 --- a/docs/quick_tour.rst +++ b/docs/quick_tour.rst @@ -627,7 +627,7 @@ You'll now see an attractive (and collapsible) menu in the right of your browser, providing introspective access to debugging information. Even better, if your web application generates an error, you will see a nice traceback on the screen. When -you want to disable this toolbar, no need to change code: you can +you want to disable this toolbar, there's no need to change code: you can remove it from ``pyramid.includes`` in the relevant ``.ini`` configuration file. -- cgit v1.2.3 From 109792709bf90eddf85eaaed1743b5cbb1faa34e Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 16 May 2015 16:12:35 -0700 Subject: cherrypick from 1.5 --- docs/narr/install.rst | 6 +++--- docs/quick_tour.rst | 9 ++++----- docs/quick_tutorial/requirements.rst | 10 +++------- 3 files changed, 10 insertions(+), 15 deletions(-) (limited to 'docs') diff --git a/docs/narr/install.rst b/docs/narr/install.rst index a825b61b9..0f114a9c7 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -33,11 +33,11 @@ For Mac OS X Users ~~~~~~~~~~~~~~~~~~ Python comes pre-installed on Mac OS X, but due to Apple's release cycle, -it is often out of date. Unless you have a need for a specific earlier version, -it is recommended to install the latest 2.x or 3.x version of Python. +it is often out of date. Unless you have a need for a specific earlier +version, it is recommended to install the latest 2.x or 3.x version of Python. You can install the latest verion of Python for Mac OS X from the binaries on -`python.org `_. +`python.org `_. Alternatively, you can use the `homebrew `_ package manager. diff --git a/docs/quick_tour.rst b/docs/quick_tour.rst index e71725406..1b8c82b0a 100644 --- a/docs/quick_tour.rst +++ b/docs/quick_tour.rst @@ -14,11 +14,10 @@ Installation Once you have a standard Python environment setup, getting started with Pyramid is a breeze. Unfortunately "standard" is not so simple in Python. -For this Quick Tour, it means: -`Python `_, a -`virtual environment `_ -(or `virtualenv for Python 2.7 `_), -and `setuptools `_. +For this Quick Tour, it means: `Python `_, +a `virtual environment `_ (or +`virtualenv for Python 2.7 `_), and +`setuptools `_. As an example, for Python 3.3+ on Linux: diff --git a/docs/quick_tutorial/requirements.rst b/docs/quick_tutorial/requirements.rst index b5778ea42..6628c4f17 100644 --- a/docs/quick_tutorial/requirements.rst +++ b/docs/quick_tutorial/requirements.rst @@ -58,11 +58,8 @@ Steps Install Python 3.3 or greater ----------------------------- -Download the latest standard Python 3.3+ release (not development -release) from -`python.org `_. On that page, you -must click the latest version, then scroll down to the "Downloads" section -for your operating system. +Download the latest standard Python 3.3+ release (not development release) +from `python.org `_. Windows and Mac OS X users can download and run an installer. @@ -73,8 +70,7 @@ directions. Make sure you get the proper 32- or 64-bit build and Python version. Linux users can either use their package manager to install Python 3.3 -or may -`build Python 3.3 from source +or may `build Python 3.3 from source `_. -- cgit v1.2.3 From 0d4d7cb81ae162cafe21546b1ae1df8f33b4b8af Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 16 May 2015 16:54:56 -0700 Subject: - replace image with ASCII tree diagram - make venv name generic without a version to reduce future maintenance --- docs/_static/directory_structure_generic.png | Bin 11845 -> 0 bytes docs/_static/directory_structure_initial.png | Bin 7752 -> 0 bytes docs/_static/directory_structure_pyramid.png | Bin 16746 -> 0 bytes docs/quick_tutorial/requirements.rst | 26 +++++++++++++++++--------- 4 files changed, 17 insertions(+), 9 deletions(-) delete mode 100644 docs/_static/directory_structure_generic.png delete mode 100644 docs/_static/directory_structure_initial.png delete mode 100644 docs/_static/directory_structure_pyramid.png (limited to 'docs') diff --git a/docs/_static/directory_structure_generic.png b/docs/_static/directory_structure_generic.png deleted file mode 100644 index c6d1a5b03..000000000 Binary files a/docs/_static/directory_structure_generic.png and /dev/null differ diff --git a/docs/_static/directory_structure_initial.png b/docs/_static/directory_structure_initial.png deleted file mode 100644 index 000f1bb27..000000000 Binary files a/docs/_static/directory_structure_initial.png and /dev/null differ diff --git a/docs/_static/directory_structure_pyramid.png b/docs/_static/directory_structure_pyramid.png deleted file mode 100644 index 74edd6533..000000000 Binary files a/docs/_static/directory_structure_pyramid.png and /dev/null differ diff --git a/docs/quick_tutorial/requirements.rst b/docs/quick_tutorial/requirements.rst index 6628c4f17..a737ede0e 100644 --- a/docs/quick_tutorial/requirements.rst +++ b/docs/quick_tutorial/requirements.rst @@ -82,13 +82,21 @@ Create a project directory structure We will arrive at a directory structure of ``workspace->project->package``, with our workspace named -``quick_tutorial``. The following diagram shows how this is structured -and where our virtual environment will reside: - -.. figure:: ../_static/directory_structure_pyramid.png - :alt: Final directory structure - - Final directory structure. +``quick_tutorial``. The following tree diagram shows how this will be +structured and where our virtual environment will reside as we proceed through +the tutorial: + +.. code-block:: text + + └── ~ + └── projects + └── quick_tutorial + ├── env + └── step_one + ├── intro + │ ├── __init__.py + │ └── app.py + └── setup.py For Linux, the commands to do so are as follows: @@ -132,11 +140,11 @@ environment. We set an environment variable to save typing later. .. code-block:: bash # Mac and Linux - $ export VENV=~/projects/quick_tutorial/env33/ + $ export VENV=~/projects/quick_tutorial/env # Windows # TODO: This command does not work - c:\> set VENV=c:\projects\quick_tutorial\env33 + c:\> set VENV=c:\projects\quick_tutorial\env .. _create-a-virtual-environment: -- cgit v1.2.3