23 lines
607 B
Python
23 lines
607 B
Python
|
from django import forms
|
||
|
from .models import Reservation
|
||
|
from camper.models import Offer
|
||
|
from users.models import Base_User
|
||
|
from django.core.exceptions import ValidationError
|
||
|
|
||
|
|
||
|
class ReservationForm(forms.ModelForm):
|
||
|
reservation_start_date = forms.DateField(required=True)
|
||
|
reservation_end_date = forms.DateField(required=True,)
|
||
|
class Meta:
|
||
|
model = Reservation
|
||
|
exclude = ('user',)
|
||
|
|
||
|
|
||
|
widget = {
|
||
|
'reservation_start_date': forms.DateInput(format =['%d/%m/%y']),
|
||
|
'reservation_end_date': forms.DateInput(format =['%d/%m/%y']),
|
||
|
|
||
|
}
|
||
|
|
||
|
|