1 ##############################################################################
2 # Copyright (c) 2016 Max Breitenfeldt and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 import django.forms as forms
13 from booking.models import Installer, Scenario, Opsys
16 class BookingForm(forms.Form):
17 fields = ['start', 'end', 'purpose', 'opsys', 'installer', 'scenario']
19 start = forms.DateTimeField()
20 end = forms.DateTimeField()
21 purpose = forms.CharField(max_length=300)
22 opsys = forms.ModelChoiceField(queryset=Opsys.objects.all(), required=False)
23 installer = forms.ModelChoiceField(queryset=Installer.objects.all(), required=False)
24 scenario = forms.ModelChoiceField(queryset=Scenario.objects.all(), required=False)