diff options
| author | James Bennett <ubernostrum@gmail.com> | 2010-03-03 09:01:13 +0000 |
|---|---|---|
| committer | James Bennett <ubernostrum@gmail.com> | 2010-03-03 09:01:13 +0000 |
| commit | 926bf195e007cb4f97e6ddc4bd963cb5a8d48288 (patch) | |
| tree | 17c29bc4cef1ee181d9c1fe18d947857eef2f94f /docs/ref/forms/fields.txt | |
| parent | 795e3235ffea86117848b0b3c970b86f443daec3 (diff) | |
Fixed #12601: Documented the slug field in the forms module.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/forms/fields.txt')
| -rw-r--r-- | docs/ref/forms/fields.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 2541ea0f3d..829d28359b 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -659,6 +659,21 @@ compatibility. The preferred way to provide an error message is to use the ``error_messages`` argument, passing a dictionary with ``'invalid'`` as a key and the error message as the value. +``SlugField`` +~~~~~~~~~~~~~ + +.. class:: SlugField(**kwargs) + + * Default widget: ``TextInput`` + * Empty value: ``''`` (an empty string) + * Normalizes to: A Unicode object. + * Validates that the given value contains only letters, numbers and + hyphens. + * Error messages: ``required``, ``invalid`` + +This field is intended for use in representing a model +:class:`~django.db.models.SlugField` in forms. + ``TimeField`` ~~~~~~~~~~~~~ |
