Files
PyRIGS/RIGS/forms.py
Tom Price d90306a5e0 Added event items to the event form.
Need to get this working, thinking probably best to serialize the data and submit it that way so changes are only saved on update
2014-12-03 12:13:13 +00:00

18 lines
800 B
Python

__author__ = 'Ghost'
from django import forms
from django.utils import formats
from RIGS import models
from django.conf import settings
# Events Shit
class EventForm(forms.ModelForm):
datetime_input_formats = formats.get_format_lazy("DATETIME_INPUT_FORMATS") + settings.DATETIME_INPUT_FORMATS
meet_at = forms.DateTimeField(input_formats=datetime_input_formats, required=False)
access_at = forms.DateTimeField(input_formats=datetime_input_formats, required=False)
name = forms.CharField(min_length=3)
class Meta:
model = models.Event
fields = ['is_rig', 'name', 'venue', 'start_date', 'start_time', 'end_date',
'end_time', 'meet_at', 'access_at', 'description', 'notes', 'mic',
'person', 'organisation', 'dry_hire', 'based_on']