summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-07-27 08:35:21 -0400
committerTim Graham <timograham@gmail.com>2015-07-27 10:32:47 -0400
commit87d55081ea398c65b2503d22ed3907a9175ec729 (patch)
tree56fd18ad847033f670db7847a4f549c750ef2b24 /docs/ref/models
parent29465d438e00660221e1e0ac5e2929a719c56113 (diff)
Fixed #25159 -- Removed brackets from class/function/method signatures in docs.
Thanks hellbeast for the initial patch.
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/fields.txt54
-rw-r--r--docs/ref/models/instances.txt4
-rw-r--r--docs/ref/models/lookups.txt2
-rw-r--r--docs/ref/models/querysets.txt4
-rw-r--r--docs/ref/models/relations.txt4
5 files changed, 34 insertions, 34 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 7243276305..0921fda6d8 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -396,7 +396,7 @@ otherwise. See :ref:`automatic-primary-key-fields`.
``BigIntegerField``
-------------------
-.. class:: BigIntegerField([**options])
+.. class:: BigIntegerField(**options)
A 64 bit integer, much like an :class:`IntegerField` except that it is
guaranteed to fit numbers from ``-9223372036854775808`` to
@@ -406,7 +406,7 @@ guaranteed to fit numbers from ``-9223372036854775808`` to
``BinaryField``
-------------------
-.. class:: BinaryField([**options])
+.. class:: BinaryField(**options)
A field to store raw binary data. It only supports ``bytes`` assignment. Be
aware that this field has limited functionality. For example, it is not possible
@@ -437,7 +437,7 @@ isn't defined.
``CharField``
-------------
-.. class:: CharField(max_length=None, [**options])
+.. class:: CharField(max_length=None, **options)
A string field, for small- to large-sized strings.
@@ -470,7 +470,7 @@ The default form widget for this field is a :class:`~django.forms.TextInput`.
``CommaSeparatedIntegerField``
------------------------------
-.. class:: CommaSeparatedIntegerField(max_length=None, [**options])
+.. class:: CommaSeparatedIntegerField(max_length=None, **options)
A field of integers separated by commas. As in :class:`CharField`, the
:attr:`~CharField.max_length` argument is required and the note about database
@@ -479,7 +479,7 @@ portability mentioned there should be heeded.
``DateField``
-------------
-.. class:: DateField([auto_now=False, auto_now_add=False, **options])
+.. class:: DateField(auto_now=False, auto_now_add=False, **options)
A date, represented in Python by a ``datetime.date`` instance. Has a few extra,
optional arguments:
@@ -525,7 +525,7 @@ Any combination of these options will result in an error.
``DateTimeField``
-----------------
-.. class:: DateTimeField([auto_now=False, auto_now_add=False, **options])
+.. class:: DateTimeField(auto_now=False, auto_now_add=False, **options)
A date and time, represented in Python by a ``datetime.datetime`` instance.
Takes the same extra arguments as :class:`DateField`.
@@ -537,7 +537,7 @@ The default form widget for this field is a single
``DecimalField``
----------------
-.. class:: DecimalField(max_digits=None, decimal_places=None, [**options])
+.. class:: DecimalField(max_digits=None, decimal_places=None, **options)
A fixed-precision decimal number, represented in Python by a
:class:`~decimal.Decimal` instance. Has two **required** arguments:
@@ -576,7 +576,7 @@ when :attr:`~django.forms.Field.localize` is ``False`` or
.. versionadded:: 1.8
-.. class:: DurationField([**options])
+.. class:: DurationField(**options)
A field for storing periods of time - modeled in Python by
:class:`~python:datetime.timedelta`. When used on PostgreSQL, the data type
@@ -592,7 +592,7 @@ SECOND(6)``. Otherwise a ``bigint`` of microseconds is used.
``EmailField``
--------------
-.. class:: EmailField([max_length=254, **options])
+.. class:: EmailField(max_length=254, **options)
A :class:`CharField` that checks that the value is a valid email address. It
uses :class:`~django.core.validators.EmailValidator` to validate the input.
@@ -605,7 +605,7 @@ uses :class:`~django.core.validators.EmailValidator` to validate the input.
``FileField``
-------------
-.. class:: FileField([upload_to=None, max_length=100, **options])
+.. class:: FileField(upload_to=None, max_length=100, **options)
A file-upload field.
@@ -821,7 +821,7 @@ periodically via e.g. cron).
``FilePathField``
-----------------
-.. class:: FilePathField(path=None, [match=None, recursive=False, max_length=100, **options])
+.. class:: FilePathField(path=None, match=None, recursive=False, max_length=100, **options)
A :class:`CharField` whose choices are limited to the filenames in a certain
directory on the filesystem. Has three special arguments, of which the first is
@@ -874,7 +874,7 @@ can change the maximum length using the :attr:`~CharField.max_length` argument.
``FloatField``
--------------
-.. class:: FloatField([**options])
+.. class:: FloatField(**options)
A floating-point number represented in Python by a ``float`` instance.
@@ -896,7 +896,7 @@ when :attr:`~django.forms.Field.localize` is ``False`` or
``ImageField``
--------------
-.. class:: ImageField([upload_to=None, height_field=None, width_field=None, max_length=100, **options])
+.. class:: ImageField(upload_to=None, height_field=None, width_field=None, max_length=100, **options)
Inherits all attributes and methods from :class:`FileField`, but also
validates that the uploaded object is a valid image.
@@ -931,7 +931,7 @@ The default form widget for this field is a
``IntegerField``
----------------
-.. class:: IntegerField([**options])
+.. class:: IntegerField(**options)
An integer. Values from ``-2147483648`` to ``2147483647`` are safe in all
databases supported by Django. The default form widget for this field is a
@@ -941,7 +941,7 @@ is ``False`` or :class:`~django.forms.TextInput` otherwise.
``GenericIPAddressField``
-------------------------
-.. class:: GenericIPAddressField([protocol=both, unpack_ipv4=False, **options])
+.. class:: GenericIPAddressField(protocol=both, unpack_ipv4=False, **options)
An IPv4 or IPv6 address, in string format (e.g. ``192.0.2.30`` or
``2a02:42fe::4``). The default form widget for this field is a
@@ -972,7 +972,7 @@ values are stored as null.
``NullBooleanField``
--------------------
-.. class:: NullBooleanField([**options])
+.. class:: NullBooleanField(**options)
Like a :class:`BooleanField`, but allows ``NULL`` as one of the options. Use
this instead of a :class:`BooleanField` with ``null=True``. The default form
@@ -981,7 +981,7 @@ widget for this field is a :class:`~django.forms.NullBooleanSelect`.
``PositiveIntegerField``
------------------------
-.. class:: PositiveIntegerField([**options])
+.. class:: PositiveIntegerField(**options)
Like an :class:`IntegerField`, but must be either positive or zero (``0``).
Values from ``0`` to ``2147483647`` are safe in all databases supported by
@@ -990,7 +990,7 @@ Django. The value ``0`` is accepted for backward compatibility reasons.
``PositiveSmallIntegerField``
-----------------------------
-.. class:: PositiveSmallIntegerField([**options])
+.. class:: PositiveSmallIntegerField(**options)
Like a :class:`PositiveIntegerField`, but only allows values under a certain
(database-dependent) point. Values from ``0`` to ``32767`` are safe in all
@@ -999,7 +999,7 @@ databases supported by Django.
``SlugField``
-------------
-.. class:: SlugField([max_length=50, **options])
+.. class:: SlugField(max_length=50, **options)
:term:`Slug` is a newspaper term. A slug is a short label for something,
containing only letters, numbers, underscores or hyphens. They're generally used
@@ -1026,7 +1026,7 @@ of some other value. You can do this automatically in the admin using
``SmallIntegerField``
---------------------
-.. class:: SmallIntegerField([**options])
+.. class:: SmallIntegerField(**options)
Like an :class:`IntegerField`, but only allows values under a certain
(database-dependent) point. Values from ``-32768`` to ``32767`` are safe in all
@@ -1035,7 +1035,7 @@ databases supported by Django.
``TextField``
-------------
-.. class:: TextField([**options])
+.. class:: TextField(**options)
A large text field. The default form widget for this field is a
:class:`~django.forms.Textarea`.
@@ -1055,7 +1055,7 @@ However it is not enforced at the model or database level. Use a
``TimeField``
-------------
-.. class:: TimeField([auto_now=False, auto_now_add=False, **options])
+.. class:: TimeField(auto_now=False, auto_now_add=False, **options)
A time, represented in Python by a ``datetime.time`` instance. Accepts the same
auto-population options as :class:`DateField`.
@@ -1066,7 +1066,7 @@ The admin adds some JavaScript shortcuts.
``URLField``
------------
-.. class:: URLField([max_length=200, **options])
+.. class:: URLField(max_length=200, **options)
A :class:`CharField` for a URL.
@@ -1081,7 +1081,7 @@ Like all :class:`CharField` subclasses, :class:`URLField` takes the optional
.. versionadded:: 1.8
-.. class:: UUIDField([**options])
+.. class:: UUIDField(**options)
A field for storing universally unique identifiers. Uses Python's
:class:`~python:uuid.UUID` class. When used on PostgreSQL, this stores in a
@@ -1116,7 +1116,7 @@ Django also defines a set of fields that represent relations.
``ForeignKey``
--------------
-.. class:: ForeignKey(othermodel, [**options])
+.. class:: ForeignKey(othermodel, **options)
A many-to-one relationship. Requires a positional argument: the class to which
the model is related.
@@ -1374,7 +1374,7 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in
``ManyToManyField``
-------------------
-.. class:: ManyToManyField(othermodel, [**options])
+.. class:: ManyToManyField(othermodel, **options)
A many-to-many relationship. Requires a positional argument: the class to
which the model is related, which works exactly the same as it does for
@@ -1577,7 +1577,7 @@ relationship at the database level.
``OneToOneField``
-----------------
-.. class:: OneToOneField(othermodel, [parent_link=False, **options])
+.. class:: OneToOneField(othermodel, parent_link=False, **options)
A one-to-one relationship. Conceptually, this is similar to a
:class:`ForeignKey` with :attr:`unique=True <Field.unique>`, but the
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index 9fa5318a9f..867e30a6fc 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -312,7 +312,7 @@ Saving objects
To save an object back to the database, call ``save()``:
-.. method:: Model.save([force_insert=False, force_update=False, using=DEFAULT_DB_ALIAS, update_fields=None])
+.. method:: Model.save(force_insert=False, force_update=False, using=DEFAULT_DB_ALIAS, update_fields=None)
If you want customized saving behavior, you can override this ``save()``
method. See :ref:`overriding-model-methods` for more details.
@@ -533,7 +533,7 @@ value, the field will be added to the updated fields.
Deleting objects
================
-.. method:: Model.delete([using=DEFAULT_DB_ALIAS, keep_parents=False])
+.. method:: Model.delete(using=DEFAULT_DB_ALIAS, keep_parents=False)
Issues an SQL ``DELETE`` for the object. This only deletes the object in the
database; the Python instance will still exist and will still have data in
diff --git a/docs/ref/models/lookups.txt b/docs/ref/models/lookups.txt
index 60dc505ed8..c2304209d7 100644
--- a/docs/ref/models/lookups.txt
+++ b/docs/ref/models/lookups.txt
@@ -198,7 +198,7 @@ Lookup reference
The name of this lookup, used to identify it on parsing query
expressions. It cannot contain the string ``"__"``.
- .. method:: process_lhs(compiler, connection[, lhs=None])
+ .. method:: process_lhs(compiler, connection, lhs=None)
Returns a tuple ``(lhs_string, lhs_params)``, as returned by
``compiler.compile(lhs)``. This method can be overridden to tune how
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 039fea3dbc..3c0e9d0a61 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -128,7 +128,7 @@ QuerySet API
Here's the formal declaration of a ``QuerySet``:
-.. class:: QuerySet([model=None, query=None, using=None])
+.. class:: QuerySet(model=None, query=None, using=None)
Usually when you'll interact with a ``QuerySet`` you'll use it by
:ref:`chaining filters <chaining-filters>`. To make this work, most
@@ -429,7 +429,7 @@ remain undefined afterward).
distinct
~~~~~~~~
-.. method:: distinct([*fields])
+.. method:: distinct(*fields)
Returns a new ``QuerySet`` that uses ``SELECT DISTINCT`` in its SQL query. This
eliminates duplicate rows from the query results.
diff --git a/docs/ref/models/relations.txt b/docs/ref/models/relations.txt
index 8c3b5a2f33..095ee560c1 100644
--- a/docs/ref/models/relations.txt
+++ b/docs/ref/models/relations.txt
@@ -36,7 +36,7 @@ Related objects reference
In this example, the methods below will be available both on
``topping.pizza_set`` and on ``pizza.toppings``.
- .. method:: add(obj1, [obj2, ...])
+ .. method:: add(*objs)
Adds the specified model objects to the related object set.
@@ -86,7 +86,7 @@ Related objects reference
parameter ``blog`` to ``create()``. Django figures out that the new
``Entry`` object's ``blog`` field should be set to ``b``.
- .. method:: remove(obj1, [obj2, ...])
+ .. method:: remove(*objs)
Removes the specified model objects from the related object set::