| Age | Commit message (Collapse) | Author |
|
|
|
``pyramid.httpexceptions.redirect``.
- Added "HTTP Exceptions" section to Views narrative chapter including a
description of ``pyramid.httpexceptions.abort``; adjusted redirect section
to note ``pyramid.httpexceptions.redirect``.
- A default exception view for the context ``webob.exc.HTTPException`` (aka
``pyramid.httpexceptions.HTTPException``) is now registered by default.
This means that an instance of any exception class imported from
``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from
within view code; when raised, this exception view will render the
exception to a response.
- New functions named ``pyramid.httpexceptions.abort`` and
``pyramid.httpexceptions.redirect`` perform the equivalent of their Pylons
brethren when an HTTP exception handler is registered. These functions
take advantage of the newly registered exception view for
``webob.exc.HTTPException``.
- The Configurator now accepts an additional keyword argument named
``httpexception_view``. By default, this argument is populated with a
default exception view function that will be used when an HTTP exception is
raised. When ``None`` is passed for this value, an exception view for HTTP
exceptions will not be registered. Passing ``None`` returns the behavior
of raising an HTTP exception to that of Pyramid 1.0 (the exception will
propagate to middleware and to the WSGI server).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
argument. If this argument is ``True``, the added route will never be
considered for matching when a request is handled. Instead, it will only
be useful for URL generation via ``route_url`` and ``route_path``. See the
section entitled "Static Routes" in the URL Dispatch narrative chapter for
more information.
|
|
interface API documentation.
|
|
|
|
|
|
This reverts commit 94c2dc0bae9cf14cc6a5548119933e4477d07042.
|
|
This reverts commit f2d5cb59deba682d7c1d461ab5e90ba1802d42ac.
|
|
and docs for pull request
|
|
|
|
|
|
|
|
into ppaez-zodb-tutorial-test-reorg
|
|
jdnavarro-master
|
|
|
|
|
|
|
|
- Modify documentation for cross-referencing.
- Use add_view(viewname) syntax rather than add_view(view=viewname)
syntax for normalization.
- Use warnings.warn rather than zope.deprecated in order to make
testing easier.
- Move tests which test deprecated methods of configurator to a
separate test case.
|
|
https://github.com/mmerickel/pyramid into mmerickel-disambiguate_add_route
|
|
|
|
|
|
|
|
- New section in the main index
- Move Model and View tests there
- Added Functional tests
|
|
I was working through the wiki2 tutorial this morning and found some
slightly confusing bits. As I went along, I added the suggested changes
to my local files to make them match the tutorial's version, but found
several times that key parts were missing.
I'm not new to Python so this didn't slow me down, but thought some
clarifications might help new users.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
``request.response_content_type = 'foo'``. Assignments and mutations of
the following request attributes that were considered by the framework for
response influence are now deprecated: ``response_content_type``,
``response_headerlist``, ``response_status``, ``response_charset``, and
``response_cache_for``. Instead of assigning these to the request object
for detection by the rendering machinery, users should use the appropriate
API of the Response object created by accessing ``request.response``
(e.g. ``request.response_content_type = 'abc'`` ->
``request.response.content_type = 'abc'``).
- Custom request objects are now required to have a ``response`` attribute
(or reified property) if they are meant to be used with renderers. This
``response`` attribute should be an instance of the class
``pyramid.response.Response``.
- The JSON and string renderer factories now use
``request.response.content_type`` rather than
``request.response_content_type``. They determine whether they should set
the content type of the response by comparing the response's content type
against the default (usually ``text/html``); if the content type is not the
default, the renderer changes the content type (to ``application/json`` or
``text/plain`` for JSON and string renderers respectively).
- Made it possible to assign to and delete
``pyramid.testing.DummyRequest.registry`` (bugfix).
|
|
|
|
|
|
- Sections sorted by general, views, templates
- List steps in the introduction
|
|
- Consolidate two sections and promote some to first level
- Add a couple of terms
|
|
``pyramid.config.Configurator.set_view_mapper`` and refer to it within
Hooks chapter section named "Using a View Mapper".
|
|
``pyramid.interfaces.IAuthorizationPolicy`` public interfaces, and refer to
them within the ``pyramid.authentication`` and ``pyramid.authorization``
API docs.
- Render the function definitions for each exposed interface in
``pyramid.interfaces``.
Closes #167.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|