diff options
Diffstat (limited to 'docs/ref/models')
| -rw-r--r-- | docs/ref/models/fields.txt | 8 | ||||
| -rw-r--r-- | docs/ref/models/instances.txt | 4 | ||||
| -rw-r--r-- | docs/ref/models/options.txt | 5 |
3 files changed, 13 insertions, 4 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 22fadd26c3..c6a5311760 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -233,8 +233,12 @@ field will raise. Pass in a dictionary with keys matching the error messages you want to override. Error message keys include ``null``, ``blank``, ``invalid``, ``invalid_choice``, -and ``unique``. Additional error message keys are specified for each field in -the `Field types`_ section below. +``unique``, and ``unique_for_date``. Additional error message keys are +specified for each field in the `Field types`_ section below. + +.. versionadded:: 1.7 + +The ``unique_for_date`` error message key was added. ``help_text`` ------------- diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 6bc6917a9e..2177bc6a59 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -151,8 +151,8 @@ access to more than a single field:: Any :exc:`~django.core.exceptions.ValidationError` exceptions raised by ``Model.clean()`` will be stored in a special key error dictionary key, -``NON_FIELD_ERRORS``, that is used for errors that are tied to the entire model -instead of to a specific field:: +:data:`~django.core.exceptions.NON_FIELD_ERRORS`, that is used for errors +that are tied to the entire model instead of to a specific field:: from django.core.exceptions import ValidationError, NON_FIELD_ERRORS try: diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index ba07dfaeb9..ae2d7def0f 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -321,6 +321,11 @@ Django quotes column and table names behind the scenes. :class:`~django.db.models.ManyToManyField`, try using a signal or an explicit :attr:`through <ManyToManyField.through>` model. + .. versionchanged:: 1.7 + + The ``ValidationError`` raised during model validation when the + constraint is violated has the ``unique_together`` error code. + ``index_together`` ------------------ |
