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']

[((317, 334), 'django.forms.DateField', 'forms.DateField', ([], {}), '()\n', (332, 334), False, 'from django import forms\n'), ((350, 367), 'django.forms.DateField', 'forms.DateField', ([], {}), '()\n', (365, 367), False, 'from django import forms\n'), ((414, 445), 'django.forms.CharField', 'forms.CharField', ([], {'max_length': '(410)'}), '(max_length=410)\n', (429, 445), False, 'from django import forms\n'), ((498, 520), 'main.models.UserRoom.objects.all', 'UserRoom.objects.all', ([], {}), '()\n', (518, 520), False, 'from main.models import RoomReservation, UserRoom\n')]