summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorJames Bennett <ubernostrum@gmail.com>2010-03-03 09:02:53 +0000
committerJames Bennett <ubernostrum@gmail.com>2010-03-03 09:02:53 +0000
commit1332b114cc465cc34f2d9ab1b6dc15837b49415d (patch)
treed2c3faec4152539a081d20b2cad6fa818c262fb8 /docs/ref
parent36e7739d9d08cd83c9cc6be56ea33443ac26b484 (diff)
[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
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/forms/fields.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index 4bb6a7c444..94e9ba349a 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -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
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``
~~~~~~~~~~~~~