event form changes
This commit is contained in:
parent
ea023e40d3
commit
ed2b151b5e
|
@ -2,6 +2,7 @@ import floppyforms as forms
|
|||
from models import *
|
||||
from app.forms import *
|
||||
from itfprofiles.models import Person, TheatreGroup
|
||||
from itfprofiles.forms import BuzzItemsInline
|
||||
|
||||
class PersonEventForm(ItfForm):
|
||||
person = forms.ModelChoiceField(Person.objects.all(), widget=AutocompleteAddWidget(model_class=Person))
|
||||
|
@ -22,8 +23,10 @@ PersonEventInline = itf_inlineformset_factory(Event, PersonEvent, form=PersonEve
|
|||
GroupEventInline = itf_inlineformset_factory(Event, GroupEvent, form=GroupEventForm, extra=1, title="Add / Edit groups associated with this event", help_text="select the groups that are connected to this event")
|
||||
|
||||
|
||||
|
||||
|
||||
class EventForm(ItfForm):
|
||||
inlines = [PersonEventInline, GroupEventInline]
|
||||
inlines = [PersonEventInline, GroupEventInline, BuzzItemsInline]
|
||||
parent_event = forms.ModelChoiceField(Event.objects.all(), widget=AutocompleteAddWidget(model_class=Event))
|
||||
production = forms.ModelChoiceField(Production.objects.all(), widget=AutocompleteAddWidget(model_class=Production))
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class Event(ItfModel):
|
|||
oneliner = models.CharField(max_length=1024,help_text="Event slogan/one liner", blank=True)
|
||||
description = models.TextField(blank=True, null=True)
|
||||
parent_event = models.ForeignKey("Event", related_name='child_events', help_text='If this event is part of another event', blank=True, null=True)
|
||||
city = models.ForeignKey(City)
|
||||
city = models.ForeignKey(City, blank=True, null=True)
|
||||
address = models.TextField(blank=True)
|
||||
# location = models.ForeignKey(Location)
|
||||
# locations = generic.GenericRelation(Location)
|
||||
|
@ -40,6 +40,7 @@ class Event(ItfModel):
|
|||
booking_link = models.URLField(blank=True, null=True, help_text="Ticket booking link, if applicable")
|
||||
tel_no = models.CharField(max_length=100, blank=True)
|
||||
production = models.ForeignKey(Production, blank=True, null=True, help_text="If this is a showing of a production...")
|
||||
|
||||
people = models.ManyToManyField(Person, blank=True, null=True, through="PersonEvent")
|
||||
image = models.ImageField(upload_to='images/', blank=True, null=True)
|
||||
groups = models.ManyToManyField(TheatreGroup, blank=True, null=True, through="GroupEvent")
|
||||
|
|
Loading…
Reference in New Issue
Block a user