Paul Everitt
2013-08-11 ae901436a61563968cc31cc636f1fbeb5e85b528
Per discussion with Chris, just wrap up "getting started" as the Quick Tour. Still need to do more linking and perhaps add a section on root factories, authorization, authentication.
88 files deleted
1 files modified
1 files renamed
2172 ■■■■■ changed files
docs/getting_started/configuration.rst 4 ●●●● patch | view | raw | blame | history
docs/getting_started/databases.rst 21 ●●●●● patch | view | raw | blame | history
docs/getting_started/forms.rst 3 ●●●●● patch | view | raw | blame | history
docs/getting_started/gettingstarted.rst 84 ●●●●● patch | view | raw | blame | history
docs/getting_started/index.rst 60 ●●●●● patch | view | raw | blame | history
docs/getting_started/internationalization.rst 3 ●●●●● patch | view | raw | blame | history
docs/getting_started/json.rst 4 ●●●● patch | view | raw | blame | history
docs/getting_started/pserve.rst 18 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/hello_world/app.py 16 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/jinja2/app.py 11 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/jinja2/hello_world.jinja2 8 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/jinja2/views.py 8 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/json/app.py 15 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/json/hello_world.jinja2 10 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/json/hello_world.pt 17 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/json/views.py 13 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/CHANGES.txt 4 ●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/MANIFEST.in 2 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/README.txt 4 ●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/development.ini 57 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/__init__.py 34 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/locale/de/LC_MESSAGES/hello_world.mo patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/locale/de/LC_MESSAGES/hello_world.po 21 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/locale/fr/LC_MESSAGES/hello_world.mo patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/locale/fr/LC_MESSAGES/hello_world.po 21 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/locale/hello_world.pot 21 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/models.py 8 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/static/favicon.ico patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/static/logo.png patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/static/pylons.css 73 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/templates/mytemplate.jinja2 90 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/tests.py 20 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/hello_world/views.py 22 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/message-extraction.ini 3 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/setup.cfg 28 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/package/setup.py 41 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/requests/app.py 24 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/routing/app.py 12 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/routing/views.py 10 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/CHANGES.txt 4 ●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/MANIFEST.in 2 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/README.txt 14 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/development.ini 71 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/production.ini 62 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/setup.cfg 27 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/setup.py 44 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo.sqlite patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/__init__.py 20 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/models.py 29 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/__init__.py 1 ●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/initializedb.py 37 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/favicon.ico patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/footerbg.png patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/headerbg.png patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/ie6.css 8 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/middlebg.png patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pylons.css 372 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid-small.png patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid.png patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/transparent.gif patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/templates/mytemplate.pt 76 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/tests.py 33 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/sqla_demo/sqla_demo/views.py 37 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/static_assets/app.py 14 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/static_assets/hello_world.jinja2 10 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/static_assets/hello_world.pt 16 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/static_assets/static/app.css 4 ●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/static_assets/views.py 6 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/templating/app.py 10 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/templating/hello_world.pt 9 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/templating/views.py 8 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/view_classes/app.py 13 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/view_classes/delete.jinja2 9 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/view_classes/edit.jinja2 9 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/view_classes/hello.jinja2 17 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/view_classes/views.py 32 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/views/app.py 13 ●●●●● patch | view | raw | blame | history
docs/getting_started/quick_glance/views/views.py 29 ●●●●● patch | view | raw | blame | history
docs/getting_started/routes.rst 3 ●●●●● patch | view | raw | blame | history
docs/getting_started/scaffolds.rst 110 ●●●●● patch | view | raw | blame | history
docs/getting_started/security.rst 3 ●●●●● patch | view | raw | blame | history
docs/getting_started/sessions.rst 3 ●●●●● patch | view | raw | blame | history
docs/getting_started/special_views.rst 3 ●●●●● patch | view | raw | blame | history
docs/getting_started/static_assets.rst 4 ●●●● patch | view | raw | blame | history
docs/getting_started/templates.rst 4 ●●●● patch | view | raw | blame | history
docs/getting_started/testing.rst 4 ●●●● patch | view | raw | blame | history
docs/getting_started/top_ten.rst 41 ●●●●● patch | view | raw | blame | history
docs/getting_started/views.rst 30 ●●●●● patch | view | raw | blame | history
docs/index.rst 42 ●●●● patch | view | raw | blame | history
docs/quick_tour.rst 99 ●●●●● patch | view | raw | blame | history
docs/getting_started/configuration.rst
File was deleted
docs/getting_started/databases.rst
File was deleted
docs/getting_started/forms.rst
File was deleted
docs/getting_started/gettingstarted.rst
File was deleted
docs/getting_started/index.rst
File was deleted
docs/getting_started/internationalization.rst
File was deleted
docs/getting_started/json.rst
File was deleted
docs/getting_started/pserve.rst
File was deleted
docs/getting_started/quick_glance/hello_world/app.py
File was deleted
docs/getting_started/quick_glance/jinja2/app.py
File was deleted
docs/getting_started/quick_glance/jinja2/hello_world.jinja2
File was deleted
docs/getting_started/quick_glance/jinja2/views.py
File was deleted
docs/getting_started/quick_glance/json/app.py
File was deleted
docs/getting_started/quick_glance/json/hello_world.jinja2
File was deleted
docs/getting_started/quick_glance/json/hello_world.pt
File was deleted
docs/getting_started/quick_glance/json/views.py
File was deleted
docs/getting_started/quick_glance/package/CHANGES.txt
File was deleted
docs/getting_started/quick_glance/package/MANIFEST.in
File was deleted
docs/getting_started/quick_glance/package/README.txt
File was deleted
docs/getting_started/quick_glance/package/development.ini
File was deleted
docs/getting_started/quick_glance/package/hello_world/__init__.py
File was deleted
docs/getting_started/quick_glance/package/hello_world/locale/de/LC_MESSAGES/hello_world.mo
Binary files differ
docs/getting_started/quick_glance/package/hello_world/locale/de/LC_MESSAGES/hello_world.po
File was deleted
docs/getting_started/quick_glance/package/hello_world/locale/fr/LC_MESSAGES/hello_world.mo
Binary files differ
docs/getting_started/quick_glance/package/hello_world/locale/fr/LC_MESSAGES/hello_world.po
File was deleted
docs/getting_started/quick_glance/package/hello_world/locale/hello_world.pot
File was deleted
docs/getting_started/quick_glance/package/hello_world/models.py
File was deleted
docs/getting_started/quick_glance/package/hello_world/static/favicon.ico
Binary files differ
docs/getting_started/quick_glance/package/hello_world/static/logo.png
Binary files differ
docs/getting_started/quick_glance/package/hello_world/static/pylons.css
File was deleted
docs/getting_started/quick_glance/package/hello_world/templates/mytemplate.jinja2
File was deleted
docs/getting_started/quick_glance/package/hello_world/tests.py
File was deleted
docs/getting_started/quick_glance/package/hello_world/views.py
File was deleted
docs/getting_started/quick_glance/package/message-extraction.ini
File was deleted
docs/getting_started/quick_glance/package/setup.cfg
File was deleted
docs/getting_started/quick_glance/package/setup.py
File was deleted
docs/getting_started/quick_glance/requests/app.py
File was deleted
docs/getting_started/quick_glance/routing/app.py
File was deleted
docs/getting_started/quick_glance/routing/views.py
File was deleted
docs/getting_started/quick_glance/sqla_demo/CHANGES.txt
File was deleted
docs/getting_started/quick_glance/sqla_demo/MANIFEST.in
File was deleted
docs/getting_started/quick_glance/sqla_demo/README.txt
File was deleted
docs/getting_started/quick_glance/sqla_demo/development.ini
File was deleted
docs/getting_started/quick_glance/sqla_demo/production.ini
File was deleted
docs/getting_started/quick_glance/sqla_demo/setup.cfg
File was deleted
docs/getting_started/quick_glance/sqla_demo/setup.py
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo.sqlite
Binary files differ
docs/getting_started/quick_glance/sqla_demo/sqla_demo/__init__.py
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo/models.py
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/__init__.py
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/initializedb.py
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/favicon.ico
Binary files differ
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/footerbg.png
Binary files differ
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/headerbg.png
Binary files differ
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/ie6.css
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/middlebg.png
Binary files differ
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pylons.css
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid-small.png
Binary files differ
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid.png
Binary files differ
docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/transparent.gif
Binary files differ
docs/getting_started/quick_glance/sqla_demo/sqla_demo/templates/mytemplate.pt
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo/tests.py
File was deleted
docs/getting_started/quick_glance/sqla_demo/sqla_demo/views.py
File was deleted
docs/getting_started/quick_glance/static_assets/app.py
File was deleted
docs/getting_started/quick_glance/static_assets/hello_world.jinja2
File was deleted
docs/getting_started/quick_glance/static_assets/hello_world.pt
File was deleted
docs/getting_started/quick_glance/static_assets/static/app.css
File was deleted
docs/getting_started/quick_glance/static_assets/views.py
File was deleted
docs/getting_started/quick_glance/templating/app.py
File was deleted
docs/getting_started/quick_glance/templating/hello_world.pt
File was deleted
docs/getting_started/quick_glance/templating/views.py
File was deleted
docs/getting_started/quick_glance/view_classes/app.py
File was deleted
docs/getting_started/quick_glance/view_classes/delete.jinja2
File was deleted
docs/getting_started/quick_glance/view_classes/edit.jinja2
File was deleted
docs/getting_started/quick_glance/view_classes/hello.jinja2
File was deleted
docs/getting_started/quick_glance/view_classes/views.py
File was deleted
docs/getting_started/quick_glance/views/app.py
File was deleted
docs/getting_started/quick_glance/views/views.py
File was deleted
docs/getting_started/routes.rst
File was deleted
docs/getting_started/scaffolds.rst
File was deleted
docs/getting_started/security.rst
File was deleted
docs/getting_started/sessions.rst
File was deleted
docs/getting_started/special_views.rst
File was deleted
docs/getting_started/static_assets.rst
File was deleted
docs/getting_started/templates.rst
File was deleted
docs/getting_started/testing.rst
File was deleted
docs/getting_started/top_ten.rst
File was deleted
docs/getting_started/views.rst
File was deleted
docs/index.rst
@@ -48,30 +48,30 @@
Getting Started
===============
Quick tour of major facilities in Pyramid, including a
:doc:`getting_started/quick_glance` high-level
overview.
If you are new to Pyramid, we have a few resources that can help you get
up to speed right away. Our *Quick Tour* shows a little about a lot:
.. toctree::
   :maxdepth: 1
   :maxdepth: 2
   getting_started/index
   getting_started/quick_glance
   getting_started/scaffolds
   getting_started/configuration
   getting_started/routes
   getting_started/views
   getting_started/templates
   getting_started/static_assets
   getting_started/testing
   getting_started/forms
   getting_started/databases
   getting_started/security
   getting_started/json
   getting_started/sessions
   getting_started/internationalization
   getting_started/special_views
   getting_started/top_ten
   quick_tour
Also:
* To see a minimal Pyramid web application, check out `creating your first
  Pyramid application <../narr/firstapp>`_.
* For help getting Pyramid set up, try the `install guide
  <../narr/install>`_.
* To get the feel of how a Pyramid web application is created, go to the
  `single file tasks tutorial </projects/pyramid_tutorials/en/latest/single_file_tasks/single_file_tasks.html>`_ page.
* Like learning by example? Check out to the `wiki tutorial
  <../tutorials/wiki2/index.html>`_.
* Need help?  See `Support </en/latest/index.html#support-desc>`_.
.. _html_narrative_documentation:
docs/quick_tour.rst
File was renamed from docs/getting_started/quick_glance.rst
@@ -1,18 +1,17 @@
============
Quick Glance
============
=====================
Quick Tour of Pyramid
=====================
Pyramid lets you start small and finish big. This :doc:`index` guide
Pyramid lets you start small and finish big. This *Quick Tour* guide
walks you through many of Pyramid's key features. Let's put the
emphasis on *start* by doing a quick tour through Pyramid, with
snippets of code to illustrate major concepts.
.. note::
    Like the rest of Getting Started, we're using Python 3 in
    our samples. Pyramid was one of the first (October 2011) web
    frameworks to fully support Python 3. You can use Python 3
    as well for this guide, but you can also use Python 2.7.
    We use Python 3 in our samples. Pyramid was one of the first
    (October 2011) web frameworks to fully support Python 3. You can
    use Python 3 as well for this guide, but you can also use Python 2.7.
Python Setup
============
@@ -52,7 +51,7 @@
Microframeworks have shown that learning starts best from a very small
first step. Here's a tiny application in Pyramid:
.. literalinclude:: quick_glance/hello_world/app.py
.. literalinclude:: quick_tour/hello_world/app.py
    :linenos:
This simple example is easy to run. Save this as ``app.py`` and run it:
@@ -81,7 +80,7 @@
As shown in this example, the :term:`configurator` plays a central role
in Pyramid development. Building an application from loosely-coupled
parts via :doc:`../narr/configuration` is a central idea in Pyramid,
one that we will revisit regurlarly in this *Getting Started* document.
one that we will revisit regurlarly in this *Quick Tour*.
Handling Web Requests and Responses
===================================
@@ -100,7 +99,7 @@
Let's see some features of requests and responses in action:
.. literalinclude:: quick_glance/requests/app.py
.. literalinclude:: quick_tour/requests/app.py
    :pyobject: hello_world
In this Pyramid view, we get the URL being visited from ``request.url``.
@@ -132,7 +131,7 @@
the ``app.py`` to scan that module, looking for decorators that setup
the views. First, our revised ``app.py``:
.. literalinclude:: quick_glance/views/app.py
.. literalinclude:: quick_tour/views/app.py
    :linenos:
We added some more routes, but we also removed the view code.
@@ -142,7 +141,7 @@
We now have a ``views.py`` module that is focused on handling requests
and responses:
.. literalinclude:: quick_glance/views/views.py
.. literalinclude:: quick_tour/views/views.py
    :linenos:
We have 4 views, each leading to the other. If you start at
@@ -158,12 +157,6 @@
configuration`, in which a Python :term:`decorator` is placed on the
line above the view. Both approaches result in the same final
configuration, thus usually, it is simply a matter of taste.
.. note::
    We're focusing on one topic at a time, thus we are leaving out
    handling errors, logging, restarting, etc. These will be covered in
    sections of the *Getting Started* guide.
Routing
@@ -191,7 +184,7 @@
What if we want part of the URL to be available as data in my view? This
route declaration:
.. literalinclude:: quick_glance/routing/app.py
.. literalinclude:: quick_tour/routing/app.py
    :start-after: Start Route 1
    :end-before: End Route 1
@@ -199,7 +192,7 @@
``first`` and ``smith`` to ``last``. We can then use this data in our
view:
.. literalinclude:: quick_glance/routing/views.py
.. literalinclude:: quick_tour/routing/views.py
    :start-after: Start Route 1
    :end-before: End Route 1
@@ -225,7 +218,7 @@
languages. That said, Pyramid bundles Chameleon and Mako,
so in this step, let's use Chameleon as an example:
.. literalinclude:: quick_glance/templating/views.py
.. literalinclude:: quick_tour/templating/views.py
    :start-after: Start View 1
    :end-before: End View 1
@@ -234,7 +227,7 @@
our template file. Our view then simply returns data which is then
supplied to our template:
.. literalinclude:: quick_glance/templating/hello_world.pt
.. literalinclude:: quick_tour/templating/hello_world.pt
    :language: html
Since our view returned ``dict(name=request.matchdict['name'])``,
@@ -263,13 +256,13 @@
The only change in our view...point the renderer at the ``.jinja2`` file:
.. literalinclude:: quick_glance/jinja2/views.py
.. literalinclude:: quick_tour/jinja2/views.py
    :start-after: Start View 1
    :end-before: End View 1
Our Jinja2 template is very similar to our previous template:
.. literalinclude:: quick_glance/jinja2/hello_world.jinja2
.. literalinclude:: quick_tour/jinja2/hello_world.jinja2
    :language: jinja
Pyramid's templating add-ons register a new kind of renderer into your
@@ -292,7 +285,7 @@
Pyramid will serve some static assets. First, another call to the
:term:`configurator`:
.. literalinclude:: quick_glance/static_assets/app.py
.. literalinclude:: quick_tour/static_assets/app.py
    :start-after: Start Static 1
    :end-before: End Static 1
@@ -302,13 +295,13 @@
Next, make a directory ``static`` and place ``app.css`` inside:
.. literalinclude:: quick_glance/static_assets/static/app.css
.. literalinclude:: quick_tour/static_assets/static/app.css
    :language: css
All we need to do now is point to it in the ``<head>`` of our Jinja2
template:
.. literalinclude:: quick_glance/static_assets/hello_world.pt
.. literalinclude:: quick_tour/static_assets/hello_world.pt
    :language: html
    :start-after: Start Link 1
    :end-before: End Link 1
@@ -318,7 +311,7 @@
web developer changes the arrangement on disk? Pyramid gives a helper
that provides flexibility on URL generation:
.. literalinclude:: quick_glance/static_assets/hello_world.pt
.. literalinclude:: quick_tour/static_assets/hello_world.pt
    :language: html
    :start-after: Start Link 2
    :end-before: End Link 2
@@ -334,7 +327,7 @@
JavaScript to update the UI in the browser by requesting server data as
JSON. Pyramid supports this with a JSON renderer:
.. literalinclude:: quick_glance/json/views.py
.. literalinclude:: quick_tour/json/views.py
    :start-after: Start View 1
    :end-before: End View 2
@@ -360,7 +353,7 @@
The following shows a "Hello World" example with three operations: view
a form, save a change, or press the delete button:
.. literalinclude:: quick_glance/view_classes/views.py
.. literalinclude:: quick_tour/view_classes/views.py
    :start-after: Start View 1
    :end-before: End View 1
@@ -464,7 +457,7 @@
code. Our scaffold has moved this decision, and more, into the
``development.ini`` file:
.. literalinclude:: quick_glance/package/development.ini
.. literalinclude:: quick_tour/package/development.ini
    :language: ini
Let's take a quick high-level look. First, the ``.ini`` file is divided
@@ -513,7 +506,7 @@
First, change your ``setup.py`` to say:
.. literalinclude:: quick_glance/package/setup.py
.. literalinclude:: quick_tour/package/setup.py
    :start-after: Start Requires
    :end-before: End Requires
@@ -528,7 +521,7 @@
into our web application. We could do this with imperative
configuration, as we did above for the ``pyramid_jinja2`` add-on:
.. literalinclude:: quick_glance/package/hello_world/__init__.py
.. literalinclude:: quick_tour/package/hello_world/__init__.py
    :start-after: Start Include
    :end-before: End Include
@@ -536,7 +529,7 @@
``pyramid.includes`` facility and place this in our
``development.ini`` instead:
.. literalinclude:: quick_glance/package/development.ini
.. literalinclude:: quick_tour/package/development.ini
    :language: ini
    :start-after: Start Includes
    :end-before: End Includes
@@ -593,7 +586,7 @@
Our unit test passed. What did our test look like?
.. literalinclude:: quick_glance/package/hello_world/tests.py
.. literalinclude:: quick_tour/package/hello_world/tests.py
Pyramid supplies helpers for test writing, which we use in the
test setup and teardown. Our one test imports the view,
@@ -615,13 +608,13 @@
Maybe you would like to log messages in your code? In your Python
module, import and setup the logging:
.. literalinclude:: quick_glance/package/hello_world/views.py
.. literalinclude:: quick_tour/package/hello_world/views.py
    :start-after: Start Logging 1
    :end-before: End Logging 1
You can now, in your code, log messages:
.. literalinclude:: quick_glance/package/hello_world/views.py
.. literalinclude:: quick_tour/package/hello_world/views.py
    :start-after: Start Logging 2
    :end-before: End Logging 2
@@ -629,7 +622,7 @@
to the application-configured logger in your ``development.ini``. What
controls that? These sections in the configuration file:
.. literalinclude:: quick_glance/package/development.ini
.. literalinclude:: quick_tour/package/development.ini
    :language: ini
    :start-after: Start Sphinx Include
    :end-before: End Sphinx Include
@@ -653,7 +646,7 @@
:doc:`built-in sessioning support <../narr/sessions>`. In our
``__init__.py`` we first import the kind of sessioning we want:
.. literalinclude:: quick_glance/package/hello_world/__init__.py
.. literalinclude:: quick_tour/package/hello_world/__init__.py
    :start-after: Start Sphinx Include 1
    :end-before: End Sphinx Include 1
@@ -665,21 +658,21 @@
Now make a "factory" and pass it to the :term:`configurator`'s
``session_factory`` argument:
.. literalinclude:: quick_glance/package/hello_world/__init__.py
.. literalinclude:: quick_tour/package/hello_world/__init__.py
    :start-after: Start Sphinx Include 2
    :end-before: End Sphinx Include 2
Pyramid's :term:`request` object now has a ``session`` attribute
that we can use in our view code:
.. literalinclude:: quick_glance/package/hello_world/views.py
.. literalinclude:: quick_tour/package/hello_world/views.py
    :start-after: Start Sphinx Include 1
    :end-before: End Sphinx Include 1
With this, each reload will increase the counter displayed in our
Jinja2 template:
.. literalinclude:: quick_glance/package/hello_world/templates/mytemplate.jinja2
.. literalinclude:: quick_tour/package/hello_world/templates/mytemplate.jinja2
    :language: jinja
    :start-after: Start Sphinx Include 1
    :end-before: End Sphinx Include 1
@@ -717,14 +710,14 @@
language. SQLAlchemy uses "models" for this mapping. The scaffold
generated a sample model:
.. literalinclude:: quick_glance/sqla_demo/sqla_demo/models.py
.. literalinclude:: quick_tour/sqla_demo/sqla_demo/models.py
    :start-after: Start Sphinx Include
    :end-before: End Sphinx Include
View code, which mediates the logic between web requests and the rest
of the system, can then easily get at the data thanks to SQLAlchemy:
.. literalinclude:: quick_glance/sqla_demo/sqla_demo/views.py
.. literalinclude:: quick_tour/sqla_demo/sqla_demo/views.py
    :start-after: Start Sphinx Include
    :end-before: End Sphinx Include
@@ -787,20 +780,10 @@
widgets using attractive CSS from Bootstrap and more powerful widgets
from Chosen.
Awesome Pyramid Features
========================
For the most part this *Quick Glance* has covered concepts that are
common in Python web frameworks. Pyramid has a unique niche,
though. It helps you start with a small project that grows into a
larger project. Let's look at some of the unique facilities that help.
Conclusion
==========
This *Quick Glance* was a little about a lot. We introduced a long list
of concepts in Pyramid, many of which are expanded on more fully later
in *Getting Started* and certainly in the Pyramid developer docs.
This *Quick Tour* covered a little about a lot. We introduced a long list
of concepts in Pyramid, many of which are expanded on more fully in the
Pyramid developer docs.