PageRenderTime 137ms CodeModel.GetById 132ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/regressiontests/i18n/forms.py

https://code.google.com/p/mango-py/
Python | 22 lines | 18 code | 4 blank | 0 comment | 0 complexity | 5e8537459d803c0d3108225eaa5fc63c MD5 | raw file
 1from django import template, forms
 2from django.forms.extras import SelectDateWidget
 3from models import Company
 4
 5class I18nForm(forms.Form):
 6    decimal_field = forms.DecimalField(localize=True)
 7    float_field = forms.FloatField(localize=True)
 8    date_field = forms.DateField(localize=True)
 9    datetime_field = forms.DateTimeField(localize=True)
10    time_field = forms.TimeField(localize=True)
11    integer_field = forms.IntegerField(localize=True)
12
13class SelectDateForm(forms.Form):
14    date_field = forms.DateField(widget=SelectDateWidget)
15
16class CompanyForm(forms.ModelForm):
17    cents_payed = forms.DecimalField(max_digits=4, decimal_places=2, localize=True)
18    products_delivered = forms.IntegerField(localize=True)
19    date_added = forms.DateTimeField(localize=True)
20
21    class Meta:
22        model = Company