'Adds a route predicate factory.  The view predicate can later be
named as a keyword argument to
:meth:`pyramid.config.Configurator.add_route`.
``name`` should be the name of the predicate.  It must be a valid
Python identifier (it will be used as a keyword argument to
``add_route``).
``factory`` should be a :term:`predicate factory` or :term:`dotted
Python name` which refers to a predicate factory.
See :ref:`view_and_route_predicates` for more information.
.. versionadded:: 1.4'

@action_method
def add_route_predicate(self, name, factory, weighs_more_than=None, weighs_less_than=None):

    self._add_predicate('route', name, factory, weighs_more_than=weighs_more_than, weighs_less_than=weighs_less_than)
