Skip to content

Commit

Permalink
Merge pull request Pylons#1442 from stevepiercy/master
Browse files Browse the repository at this point in the history
minor rewrapping, grammar fixes to QT docs
  • Loading branch information
stevepiercy committed Nov 10, 2014
2 parents cb5b078 + 95bf541 commit af472ad
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
52 changes: 25 additions & 27 deletions docs/quick_tutorial/debugtoolbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,31 @@ Steps
Analysis
========

``pyramid_debugtoolbar`` is a full-fledged Python package,
available on PyPI just like thousands of other Python packages. Thus we
start by installing the ``pyramid_debugtoolbar`` package into our
virtual environment using normal Python package installation commands.

The ``pyramid_debugtoolbar`` Python package is also a Pyramid add-on,
which means we need to include its add-on configuration into our web
application. We could do this with imperative configuration in
``tutorial/__init__.py`` by using ``config.include``. Pyramid also
supports wiring in add-on configuration via our ``development.ini``
using ``pyramid.includes``. We use this to load the configuration for
the debugtoolbar.

You'll now see an attractive button on the right side of
your browser, which you may click to provide introspective access to debugging
information in a new browser tab. 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 remove it from
``pyramid.includes`` in the relevant ``.ini`` configuration file (thus
showing why configuration files are handy.)

Note injects a small amount of html/css into your app just before the closing
``</body>`` tag in order to display itself. If you
start to experience otherwise inexplicable client-side weirdness, you can shut
it off by commenting out the ``pyramid_debugtoolbar`` line in
``pyramid.includes`` temporarily.
``pyramid_debugtoolbar`` is a full-fledged Python package, available on PyPI
just like thousands of other Python packages. Thus we start by installing the
``pyramid_debugtoolbar`` package into our virtual environment using normal
Python package installation commands.

The ``pyramid_debugtoolbar`` Python package is also a Pyramid add-on, which
means we need to include its add-on configuration into our web application. We
could do this with imperative configuration in ``tutorial/__init__.py`` by
using ``config.include``. Pyramid also supports wiring in add-on configuration
via our ``development.ini`` using ``pyramid.includes``. We use this to load
the configuration for the debugtoolbar.

You'll now see an attractive button on the right side of your browser, which
you may click to provide introspective access to debugging information in a
new browser tab. 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 remove it from ``pyramid.includes``
in the relevant ``.ini`` configuration file (thus showing why configuration
files are handy.)

Note that the toolbar injects a small amount of html/css into your app just
before the closing ``</body>`` tag in order to display itself. If you start to
experience otherwise inexplicable client-side weirdness, you can shut it off
by commenting out the ``pyramid_debugtoolbar`` line in ``pyramid.includes``
temporarily.

.. seealso:: See also :ref:`pyramid_debugtoolbar <toolbar:overview>`.

Expand Down
2 changes: 1 addition & 1 deletion docs/quick_tutorial/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ we might need to detect problems when other people use the site. We
need *logging*.

Fortunately Pyramid uses the normal Python approach to logging. The
scaffold generated, in your ``development.ini``, a number of lines that
scaffold generated, in your ``development.ini``, has a number of lines that
configure the logging for you to some reasonable defaults. You then see
messages sent by Pyramid (for example, when a new request comes in.)

Expand Down

0 comments on commit af472ad

Please sign in to comment.