parts/django/tests/regressiontests/i18n/forms.py
author Nishanth Amuluru <nishanth@fossee.in>
Tue, 11 Jan 2011 12:30:10 +0530
changeset 378 8fcde6f8f750
parent 307 c6bca38c1cbf
permissions -rw-r--r--
added view_user functionality

from django import template, forms
from django.forms.extras import SelectDateWidget
from models import Company

class I18nForm(forms.Form):
    decimal_field = forms.DecimalField(localize=True)
    float_field = forms.FloatField(localize=True)
    date_field = forms.DateField(localize=True)
    datetime_field = forms.DateTimeField(localize=True)
    time_field = forms.TimeField(localize=True)
    integer_field = forms.IntegerField(localize=True)

class SelectDateForm(forms.Form):
    date_field = forms.DateField(widget=SelectDateWidget)

class CompanyForm(forms.ModelForm):
    cents_payed = forms.DecimalField(max_digits=4, decimal_places=2, localize=True)
    products_delivered = forms.IntegerField(localize=True)
    date_added = forms.DateTimeField(localize=True)

    class Meta:
        model = Company