summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/i18n.rst8
-rw-r--r--docs/narr/logging.rst2
-rw-r--r--docs/quick_tour.rst2
-rw-r--r--docs/quick_tutorial/hello_world.rst2
-rw-r--r--docs/quick_tutorial/ini.rst6
5 files changed, 11 insertions, 9 deletions
diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst
index 95f663584..3313f8dad 100644
--- a/docs/narr/i18n.rst
+++ b/docs/narr/i18n.rst
@@ -792,9 +792,11 @@ Then as a part of the code of a custom :term:`locale negotiator`:
.. code-block:: python
:linenos:
- from pyramid.threadlocal import get_current_registry
- settings = get_current_registry().settings
- languages = settings['available_languages'].split()
+ from pyramid.settings import aslist
+
+ def my_locale_negotiator(request):
+ languages = aslist(request.registry.settings['available_languages'])
+ # ...
This is only a suggestion. You can create your own "available
languages" configuration scheme as necessary.
diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst
index 8f6c74fd4..333d6a4e6 100644
--- a/docs/narr/logging.rst
+++ b/docs/narr/logging.rst
@@ -242,7 +242,7 @@ level is set to ``INFO``, whereas the application's log level is set to
[logger_myapp]
level = DEBUG
handlers =
- qualname = helloworld
+ qualname = myapp
All of the child loggers of the ``myapp`` logger will inherit the ``DEBUG``
level unless they're explicitly set differently. Meaning the ``myapp.views``,
diff --git a/docs/quick_tour.rst b/docs/quick_tour.rst
index 4ab39bb11..41a0dc8c0 100644
--- a/docs/quick_tour.rst
+++ b/docs/quick_tour.rst
@@ -700,7 +700,7 @@ we might need to detect situations 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).
diff --git a/docs/quick_tutorial/hello_world.rst b/docs/quick_tutorial/hello_world.rst
index 1a9ba4c9d..4ae80ca87 100644
--- a/docs/quick_tutorial/hello_world.rst
+++ b/docs/quick_tutorial/hello_world.rst
@@ -77,7 +77,7 @@ explanation:
#. *Lines 12-14*. Use Pyramid's :term:`configurator` to connect
:term:`view` code to a particular URL :term:`route`.
-#. *Lines 6-7*. Implement the view code that generates the
+#. *Lines 6-8*. Implement the view code that generates the
:term:`response`.
#. *Lines 15-17*. Publish a :term:`WSGI` app using an HTTP
diff --git a/docs/quick_tutorial/ini.rst b/docs/quick_tutorial/ini.rst
index 3402c50e8..b8720711b 100644
--- a/docs/quick_tutorial/ini.rst
+++ b/docs/quick_tutorial/ini.rst
@@ -14,9 +14,9 @@ Pyramid has a first-class concept of
:ref:`configuration <configuration_narr>` distinct from code.
This approach is optional, but its presence makes it distinct from
other Python web frameworks. It taps into Python's ``setuptools``
-library, which establishes conventions for how Python projects can be
-installed and provide "entry points". Pyramid uses an entry point to
-let a Pyramid application it where to find the WSGI app.
+library, which establishes conventions for installing and providing
+"entry points" for Python projects. Pyramid uses an entry point to
+let a Pyramid application know where to find the WSGI app.
Objectives
==========