from django.db.models import fields
from main.models import RoomReservation, UserRoom
from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth import authenticate, login
from django.contrib.auth import get_user_model


class ReservateRoomForm(forms.Form):
    begin_date = forms.DateField()
    end_date = forms.DateField()

class AddCommentForm(forms.Form):
    text = forms.CharField(max_length=410)
    accommodation = forms.ModelChoiceField(queryset=UserRoom.objects.all())

class EditReservationForm(forms.ModelForm):
    class Meta:
        model = RoomReservation
        fields = ['begin_date', 'end_date']

[((10, 17, 10, 34), 'django.forms.DateField', 'forms.DateField', ({}, {}), '()', False, 'from django import forms\n'), ((11, 15, 11, 32), 'django.forms.DateField', 'forms.DateField', ({}, {}), '()', False, 'from django import forms\n'), ((14, 11, 14, 42), 'django.forms.CharField', 'forms.CharField', (), '', False, 'from django import forms\n'), ((15, 52, 15, 74), 'main.models.UserRoom.objects.all', 'UserRoom.objects.all', ({}, {}), '()', False, 'from main.models import RoomReservation, UserRoom\n')]