JourneyJoker/auction/forms.py
Klaus-Uwe Mitterer 88dbecec35 A few more views
Fixing inquiry processing view
2021-04-13 14:44:22 +02:00

19 lines
No EOL
721 B
Python

from django import forms
from django_countries.fields import CountryField
from .models import Inquiry
class InquiryProcessForm(forms.ModelForm):
first_name = forms.CharField(max_length=64, required=True)
last_name = forms.CharField(max_length=64, required=True)
street = forms.CharField(max_length=64, required=True)
city = forms.CharField(max_length=64, required=True)
zip = forms.CharField(max_length=16)
state = forms.CharField(max_length=64)
country = CountryField().formfield(required=True)
terms = forms.BooleanField(required=True)
class Meta:
model = Inquiry
fields = ["destination_radius", "arrival", "min_nights", "budget", "adults", "children", "comment"]