Commit 87d55081 authored by Tim Graham's avatar Tim Graham
Browse files

Fixed #25159 -- Removed brackets from class/function/method signatures in docs.

Thanks hellbeast for the initial patch.
parent 29465d43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ Writing this view is left as an exercise to the reader.
Making actions available site-wide
----------------------------------

.. method:: AdminSite.add_action(action[, name])
.. method:: AdminSite.add_action(action, name=None)

    Some actions are best if they're made available to *any* object in the admin
    site -- the export action defined above would be a good candidate. You can
+2 −2
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ Other topics
The register decorator
----------------------

.. function:: register(*models, [site=django.admin.sites.site])
.. function:: register(*models, site=django.admin.sites.site)

    There is also a decorator for registering your ``ModelAdmin`` classes::

@@ -2830,7 +2830,7 @@ supplied by the admin views for the current model.
The ``staff_member_required`` decorator
=======================================

.. function:: staff_member_required([redirect_field_name=REDIRECT_FIELD_NAME, login_url='admin:login'])
.. function:: staff_member_required(redirect_field_name='next', login_url='admin:login')

    This decorator is used on the admin views that require authorization. A
    view decorated with this function will having the following behavior:
+2 −2
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ The ``ContentTypeManager``
        it's preferred to use this method over the usual
        ``ContentType.objects.get(pk=id)``

    .. method:: get_for_model(model[, for_concrete_model=True])
    .. method:: get_for_model(model, for_concrete_model=True)

        Takes either a model class or an instance of a model, and returns the
        :class:`~django.contrib.contenttypes.models.ContentType` instance
@@ -204,7 +204,7 @@ The ``ContentTypeManager``
        the :class:`~django.contrib.contenttypes.models.ContentType` of a proxy
        model.

    .. method:: get_for_models(*models[, for_concrete_models=True])
    .. method:: get_for_models(*models, for_concrete_models=True)

        Takes a variadic number of model classes, and returns a dictionary
        mapping the model classes to the
+4 −4
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ points, polygons, etc.), as well as the names and types of any
additional fields (:class:`Field`) of data that may be associated with
each feature in that layer.

.. class:: DataSource(ds_input, [encoding='utf-8'])
.. class:: DataSource(ds_input, encoding='utf-8')

   The constructor for ``DataSource`` only requires one parameter: the path of
   the file you want to read. However, OGR
@@ -244,7 +244,7 @@ __ http://www.gdal.org/ogr/ogr_formats.html
      >>> layer.get_fields('Name')
      ['Pueblo', 'Lawrence', 'Houston']

   .. method:: get_geoms([geos=False])
   .. method:: get_geoms(geos=False)

   A method that returns a list containing the geometry of each feature
   in the layer.  If the optional argument ``geos`` is set to ``True``
@@ -445,7 +445,7 @@ systems and coordinate transformation::
    >>> from django.contrib.gis.gdal import OGRGeometry
    >>> polygon = OGRGeometry('POLYGON((0 0, 5 0, 5 5, 0 5))')

.. class:: OGRGeometry(geom_input[, srs=None])
.. class:: OGRGeometry(geom_input, srs=None)

   This object is a wrapper for the `OGR Geometry`__ class.
   These objects are instantiated directly from the given ``geom_input``
@@ -1416,7 +1416,7 @@ blue.

            This property can now be set as well.

    .. method:: datatype([as_string=False])
    .. method:: datatype(as_string=False)

        The data type contained in the band, as an integer constant between 0
        (Unknown) and 11. If ``as_string`` is ``True``, the data type is
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ Defaults to ``'GeoLiteCity.dat'``.
``GeoIP`` API
=============

.. class:: GeoIP([path=None, cache=0, country=None, city=None])
.. class:: GeoIP(path=None, cache=0, country=None, city=None)

The ``GeoIP`` object does not require any parameters to use the default
settings.  However, at the very least the :setting:`GEOIP_PATH` setting
Loading