mirror of
https://github.com/django/django.git
synced 2025-07-19 17:19:12 +00:00
[1.0.X] Merged trunk changes [9850], [9851], [9852], [9853]
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d9b5a414ca
commit
267122978f
@ -259,7 +259,7 @@ request to the URL :file:`/rss/beats/0613/`:
|
|||||||
a 404 error for that request.
|
a 404 error for that request.
|
||||||
|
|
||||||
.. versionadded:: 1.0
|
.. versionadded:: 1.0
|
||||||
meth:`get_object()` can handle the :file:`/rss/beats/` url.
|
:meth:`get_object()` can handle the :file:`/rss/beats/` url.
|
||||||
|
|
||||||
The :meth:`get_object()` method also has a chance to handle the
|
The :meth:`get_object()` method also has a chance to handle the
|
||||||
:file:`/rss/beats/` url. In this case, :data:`bits` will be an
|
:file:`/rss/beats/` url. In this case, :data:`bits` will be an
|
||||||
|
@ -23,6 +23,7 @@ how they work. Each ``Field`` instance has a ``clean()`` method, which takes
|
|||||||
a single argument and either raises a ``django.forms.ValidationError``
|
a single argument and either raises a ``django.forms.ValidationError``
|
||||||
exception or returns the clean value::
|
exception or returns the clean value::
|
||||||
|
|
||||||
|
>>> from django import forms
|
||||||
>>> f = forms.EmailField()
|
>>> f = forms.EmailField()
|
||||||
>>> f.clean('foo@example.com')
|
>>> f.clean('foo@example.com')
|
||||||
u'foo@example.com'
|
u'foo@example.com'
|
||||||
|
@ -107,6 +107,8 @@ built-in Field classes.
|
|||||||
However, if you want to use a different widget for a field, you can -
|
However, if you want to use a different widget for a field, you can -
|
||||||
just use the 'widget' argument on the field definition. For example::
|
just use the 'widget' argument on the field definition. For example::
|
||||||
|
|
||||||
|
from django import forms
|
||||||
|
|
||||||
class CommentForm(forms.Form):
|
class CommentForm(forms.Form):
|
||||||
name = forms.CharField()
|
name = forms.CharField()
|
||||||
url = forms.URLField()
|
url = forms.URLField()
|
||||||
|
@ -1155,7 +1155,7 @@ For example::
|
|||||||
|
|
||||||
{{ value|linebreaks }}
|
{{ value|linebreaks }}
|
||||||
|
|
||||||
If ``value`` is ``Joel\nis a slug``, the output will be ``<p>Joel<br>is a
|
If ``value`` is ``Joel\nis a slug``, the output will be ``<p>Joel<br />is a
|
||||||
slug</p>``.
|
slug</p>``.
|
||||||
|
|
||||||
.. templatefilter:: linebreaksbr
|
.. templatefilter:: linebreaksbr
|
||||||
|
@ -125,7 +125,8 @@ The Django object itself can be inspected as ``deserialized_object.object``.
|
|||||||
Serialization formats
|
Serialization formats
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Django "ships" with a few included serializers:
|
Django supports a number of serialization formats, some of which require you
|
||||||
|
to install third-party Python modules:
|
||||||
|
|
||||||
========== ==============================================================
|
========== ==============================================================
|
||||||
Identifier Information
|
Identifier Information
|
||||||
|
Loading…
x
Reference in New Issue
Block a user