diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-04-27 16:44:52 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-04-27 16:44:52 +0000 |
| commit | 12cb6df7728c8321905a08b0864b3ff0386c62cf (patch) | |
| tree | 945e3cbf094775c57f0a6b94f36e78885cbd4a53 /repoze/bfg/tests/test_configuration.py | |
| parent | 4c8f4d965e06b6bd584151896bfb37663cd69501 (diff) | |
| download | pyramid-12cb6df7728c8321905a08b0864b3ff0386c62cf.tar.gz pyramid-12cb6df7728c8321905a08b0864b3ff0386c62cf.tar.bz2 pyramid-12cb6df7728c8321905a08b0864b3ff0386c62cf.zip | |
Features
--------
- A locale negotiator no longer needs to be registered explicitly. The
default locale negotiator at
``repoze.bfg.i18n.default_locale_negotiator`` is now used
unconditionally as... um, the default locale negotiator.
- The default locale negotiator has become more complex.
* First, the negotiator looks for the ``_LOCALE_`` attribute of
the request object (possibly set by an :term:`event listener`).
* Then it looks for the ``request.params['_LOCALE_']`` value.
* Then it looks for the ``request.cookies['_LOCALE_']`` value.
Backwards Incompatibilities
---------------------------
- The default locale negotiator now looks for the parameter named
``_LOCALE_`` rather than a parameter named ``locale`` in
``request.params``.
Behavior Changes
----------------
- A locale negotiator may now return ``None``, signifying that the
default locale should be used.
Documentation
-------------
- Documentation concerning locale negotiation in the
Internationalizationa and Localization chapter was updated.
Diffstat (limited to 'repoze/bfg/tests/test_configuration.py')
| -rw-r--r-- | repoze/bfg/tests/test_configuration.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/repoze/bfg/tests/test_configuration.py b/repoze/bfg/tests/test_configuration.py index 0a443720f..16b590cdd 100644 --- a/repoze/bfg/tests/test_configuration.py +++ b/repoze/bfg/tests/test_configuration.py @@ -3518,6 +3518,8 @@ class DummyRequest: subpath = () def __init__(self): self.environ = {'PATH_INFO':'/static'} + self.params = {} + self.cookies = {} def copy(self): return self def get_response(self, app): |
