mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
[1.1.X] Fixed #12601: Documented the slug field in the forms module. Backport of [12673] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
36e7739d9d
commit
1332b114cc
@ -643,6 +643,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
|
``error_messages`` argument, passing a dictionary with ``'invalid'`` as a key
|
||||||
and the error message as the value.
|
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``
|
``TimeField``
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user