mirror of https://github.com/django/django.git
[1.11.x] Removed self from method signatures in docs.
Backport of 757aefc12b
from master
This commit is contained in:
parent
8d5bccfe76
commit
d8039dfb0a
|
@ -571,7 +571,7 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||||
permission string ``perm``. Returns ``False`` if the user is not
|
permission string ``perm``. Returns ``False`` if the user is not
|
||||||
:attr:`~django.contrib.auth.models.CustomUser.is_active`.
|
:attr:`~django.contrib.auth.models.CustomUser.is_active`.
|
||||||
|
|
||||||
.. method:: has_module_perms(self, user_obj, app_label)
|
.. method:: has_module_perms(user_obj, app_label)
|
||||||
|
|
||||||
Returns whether the ``user_obj`` has any permissions on the app
|
Returns whether the ``user_obj`` has any permissions on the app
|
||||||
``app_label``.
|
``app_label``.
|
||||||
|
|
|
@ -263,7 +263,7 @@ foundation for custom widgets.
|
||||||
``Widget`` subclasses can provide custom context values by overriding
|
``Widget`` subclasses can provide custom context values by overriding
|
||||||
this method.
|
this method.
|
||||||
|
|
||||||
.. method:: id_for_label(self, id_)
|
.. method:: id_for_label(id_)
|
||||||
|
|
||||||
Returns the HTML ID attribute of this widget for use by a ``<label>``,
|
Returns the HTML ID attribute of this widget for use by a ``<label>``,
|
||||||
given the ID of the field. Returns ``None`` if an ID isn't available.
|
given the ID of the field. Returns ``None`` if an ID isn't available.
|
||||||
|
|
|
@ -720,7 +720,7 @@ calling the appropriate methods on the wrapped expression.
|
||||||
clone.expression = self.expression.relabeled_clone(change_map)
|
clone.expression = self.expression.relabeled_clone(change_map)
|
||||||
return clone
|
return clone
|
||||||
|
|
||||||
.. method:: convert_value(self, value, expression, connection, context)
|
.. method:: convert_value(value, expression, connection, context)
|
||||||
|
|
||||||
A hook allowing the expression to coerce ``value`` into a more
|
A hook allowing the expression to coerce ``value`` into a more
|
||||||
appropriate type.
|
appropriate type.
|
||||||
|
|
|
@ -79,7 +79,7 @@ field references, aggregates, and ``Transform`` are examples that follow this
|
||||||
API. A class is said to follow the query expression API when it implements the
|
API. A class is said to follow the query expression API when it implements the
|
||||||
following methods:
|
following methods:
|
||||||
|
|
||||||
.. method:: as_sql(self, compiler, connection)
|
.. method:: as_sql(compiler, connection)
|
||||||
|
|
||||||
Responsible for producing the query string and parameters for the expression.
|
Responsible for producing the query string and parameters for the expression.
|
||||||
The ``compiler`` is an ``SQLCompiler`` object, which has a ``compile()``
|
The ``compiler`` is an ``SQLCompiler`` object, which has a ``compile()``
|
||||||
|
@ -95,7 +95,7 @@ following methods:
|
||||||
override the generation of the SQL string. See :meth:`Func.as_sql` for
|
override the generation of the SQL string. See :meth:`Func.as_sql` for
|
||||||
example usage.
|
example usage.
|
||||||
|
|
||||||
.. method:: as_vendorname(self, compiler, connection)
|
.. method:: as_vendorname(compiler, connection)
|
||||||
|
|
||||||
Works like ``as_sql()`` method. When an expression is compiled by
|
Works like ``as_sql()`` method. When an expression is compiled by
|
||||||
``compiler.compile()``, Django will first try to call ``as_vendorname()``,
|
``compiler.compile()``, Django will first try to call ``as_vendorname()``,
|
||||||
|
|
|
@ -167,7 +167,7 @@ what's passed by :class:`~django.template.backends.django.DjangoTemplates`.
|
||||||
Loads a template with the given name, compiles it and returns a
|
Loads a template with the given name, compiles it and returns a
|
||||||
:class:`Template` object.
|
:class:`Template` object.
|
||||||
|
|
||||||
.. method:: Engine.select_template(self, template_name_list)
|
.. method:: Engine.select_template(template_name_list)
|
||||||
|
|
||||||
Like :meth:`~Engine.get_template`, except it takes a list of names
|
Like :meth:`~Engine.get_template`, except it takes a list of names
|
||||||
and returns the first template that was found.
|
and returns the first template that was found.
|
||||||
|
|
Loading…
Reference in New Issue