Add Installer and Scenario fields to bookings
[pharos.git] / tools / pharos-dashboard / src / booking / forms.py
1 ##############################################################################
2 # Copyright (c) 2016 Max Breitenfeldt and others.
3 #
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 ##############################################################################
9
10
11 import django.forms as forms
12
13 from booking.models import Installer, Scenario
14
15
16 class BookingForm(forms.Form):
17     fields = ['start', 'end', 'purpose', 'installer', 'scenario']
18
19     start = forms.DateTimeField()
20     end = forms.DateTimeField()
21     purpose = forms.CharField(max_length=300)
22     installer = forms.ModelChoiceField(queryset=Installer.objects.all(), required=False)
23     scenario = forms.ModelChoiceField(queryset=Scenario.objects.all(), required=False)