Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ Deprecations
Documentation Changes
---------------------

- Improve rendering of API Documentation by removing the prefixes to APIs in the sidebar.
See https://github.com/Pylons/pyramid/pull/3834
12 changes: 6 additions & 6 deletions docs/api/authorization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.. autoclass:: ACLAuthorizationPolicy

Constants
---------
~~~~~~~~~

.. attribute:: Everyone

Expand Down Expand Up @@ -57,22 +57,22 @@ Constants
Moved from ``pyramid.security`` into ``pyramid.authorization``.

Return Values
-------------
~~~~~~~~~~~~~

.. autoclass:: ACLDenied
:members: msg

.. automethod:: __new__

.. versionadded:: 2.0
.. versionadded:: 2.0

Moved from ``pyramid.security`` into ``pyramid.authorization``.
Moved from ``pyramid.security`` into ``pyramid.authorization``.

.. autoclass:: ACLAllowed
:members: msg

.. automethod:: __new__

.. versionadded:: 2.0
.. versionadded:: 2.0

Moved from ``pyramid.security`` into ``pyramid.authorization``.
Moved from ``pyramid.security`` into ``pyramid.authorization``.
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def nothing(*arg):
# unit titles (such as .. function::).
add_module_names = False

# Show "add_view()" rather than "Configurator.add_view()" for API objects in
# the sidebar table of contents. The parents are already given by the nesting,
# and the fully qualified names are too long to fit in the sidebar.
toc_object_entries_show_parents = 'hide'

# The name of the Pygments (syntax highlighting) style to use.
#pygments_style = book and 'bw' or 'tango'
if book:
Expand Down
2 changes: 1 addition & 1 deletion docs/narr/hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ method. For example:
def __call__(self, context, request):
return request.content_type == self.val

The constructor of an :class:`pyramid.interfaces.IPredicateFactory`` takes two arguments: ``val`` and ``info``.
The constructor of an :class:`pyramid.interfaces.IPredicateFactory` takes two arguments: ``val`` and ``info``.
The ``val`` argument will be the argument passed to ``view_config`` (or ``add_view``).
In the example above, it will be the string ``File``.
The second argument, ``info``, will be an :class:`pyramid.interfaces.IPredicateInfo` instance created relative to the action configuring the predicate.
Expand Down
2 changes: 1 addition & 1 deletion docs/whatsnew-1.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Minor Feature Additions
earlier calls. See https://github.com/Pylons/pyramid/pull/2902

- Added a new ``callback`` option to
:meth:`pyramid.config.Configurator.set_default_csrf_options`` which
:meth:`pyramid.config.Configurator.set_default_csrf_options` which
can be used to determine per-request whether CSRF checking should be enabled
to allow for a mix authentication methods. Only cookie-based methods
generally require CSRF checking.
Expand Down
2 changes: 1 addition & 1 deletion docs/whatsnew-2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Deprecations
- :class:`pyramid.authorization.ACLAuthorizationPolicy`
- The ``effective_principals`` view and route predicates.

- Deprecated :func:`pyramid.security.principals_allowed_by_permission``.
- Deprecated :func:`pyramid.security.principals_allowed_by_permission`.
This method continues to work with the deprecated :class:`pyramid.interfaces.IAuthorizationPolicy` interface but will not work with the new :class:`pyramid.interfaces.ISecurityPolicy`.
See https://github.com/Pylons/pyramid/pull/3465

Expand Down
2 changes: 1 addition & 1 deletion src/pyramid/config/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def testing_securitypolicy(
:type userid: str
:param identity: If provided, the policy's ``identity`` method will
return this value. As a result,
:attr:`pyramid.request.Request.identity`` will have this value.
:attr:`pyramid.request.Request.identity` will have this value.
:type identity: object
:param permissive: If true, the policy will allow access to any user
for any permission. If false, the policy will deny all access.
Expand Down
2 changes: 1 addition & 1 deletion src/pyramid/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PredicateMismatch(HTTPNotFound):

This exception subclasses the :class:`HTTPNotFound` exception for a
specific reason: if it reaches the main exception handler, it should
be treated as :class:`HTTPNotFound`` by any exception view
be treated as :class:`HTTPNotFound` by any exception view
registrations. Thus, typically, this exception will not be seen
publicly.

Expand Down
2 changes: 1 addition & 1 deletion src/pyramid/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class JSONP(JSON):
Once this renderer is registered via
:meth:`~pyramid.config.Configurator.add_renderer` as above, you can use
``jsonp`` as the ``renderer=`` parameter to ``@view_config`` or
:meth:`pyramid.config.Configurator.add_view``:
:meth:`pyramid.config.Configurator.add_view`:

.. code-block:: python

Expand Down
2 changes: 1 addition & 1 deletion src/pyramid/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def add(self, name, val, after=None, before=None):
any other hashable object, the ``val`` should be the sortable (doesn't
need to be hashable). ``after`` and ``before`` represents the name of
one of the other sortables (or a sequence of such named) or one of the
special sentinel values :attr:`pyramid.util.FIRST`` or
special sentinel values :attr:`pyramid.util.FIRST` or
:attr:`pyramid.util.LAST` representing the first or last positions
respectively. ``FIRST`` and ``LAST`` can also be part of a sequence
passed as ``before`` or ``after``. A sortable should not be added
Expand Down
2 changes: 1 addition & 1 deletion src/pyramid/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def invoke_exception_view(

A boolean indicating whether the original error should be reraised
if a :term:`response` object could not be created. If ``False``
then an :class:`pyramid.httpexceptions.HTTPNotFound`` exception
then an :class:`pyramid.httpexceptions.HTTPNotFound` exception
will be raised. Default: ``False``.

If a response is generated then ``request.exception`` and
Expand Down
Loading