diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2011-06-09 15:05:13 +0000 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2011-06-09 15:05:13 +0000 |
| commit | 865d684a8af8e3ef7a11c43df861e1a69b0d8cd4 (patch) | |
| tree | 4948fd03776625e51e507ee46f288536b7e66ed1 /docs | |
| parent | 7f6675a5fb5a11b00ecf61f1fceaa914d42daa01 (diff) | |
Fixed #8913 - Make "must be unique" error messages customisable. Thanks to Leah Culver.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/fields.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index bc27a48bc1..5c4bbd06bc 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -210,6 +210,10 @@ The ``error_messages`` argument lets you override the default messages that the 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. + ``help_text`` ------------- @@ -416,7 +420,8 @@ optional arguments: it's not just a default value that you can override. The admin represents this as an ``<input type="text">`` with a JavaScript -calendar, and a shortcut for "Today". +calendar, and a shortcut for "Today". Includes an additional ``invalid_date`` +error message key. .. note:: As currently implemented, setting ``auto_now`` or ``auto_now_add`` to |
