mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Need to get this working, thinking probably best to serialize the data and submit it that way so changes are only saved on update
18 lines
800 B
Python
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'] |