gpp/port/forms.py

18 lines
765 B
Python
Raw Normal View History

from django.forms import Form, CharField, IntegerField, DecimalField, \
BooleanField, EmailField, DateTimeField, ImageField
from django_countries.fields import CountryField
from phonenumber_field.formfields import PhoneNumberField
class PersonForm(Form):
name = CharField(label='Name', max_length=50)
surname = CharField(label='Surname', max_length=50)
nationality = CountryField().formfield(label='Nationality')
email = EmailField(label='E-Mail')
phone = PhoneNumberField(label='Phone Number')
class AddressForm(Form):
address = CharField(label='Name', max_length=200)
zip_code = CharField(label='ZipCode', max_length=10)
city = CharField(label='City', max_length=200)
country = CountryField().formfield(label='Country')