Fixed #13032 - Added localize parameter to form fields to be able to selectively enable localization.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2010-03-27 16:43:27 +00:00
parent ad5afd6ed2
commit ca4c6f65ea
7 changed files with 60 additions and 19 deletions

View file

@ -268,6 +268,13 @@ Django uses different formats for different locales when guessing the format
used by the user when inputting data on forms. Note that Django uses different
formats for displaying data, and for parsing it.
To enable a form field to localize input and output data simply use its
``localize`` argument::
class CashRegisterForm(forms.Form):
product = forms.CharField()
revenue = forms.DecimalField(max_digits=4, decimal_places=2, localize=True)
Creating custom format files
----------------------------