minor changes in forms display, events template
This commit is contained in:
parent
4c07664d0a
commit
f5e7ebc2cc
|
@ -132,7 +132,7 @@ PERSON_EVENT_CHOICES = (
|
||||||
class PersonEvent(models.Model):
|
class PersonEvent(models.Model):
|
||||||
person = models.ForeignKey(Person)
|
person = models.ForeignKey(Person)
|
||||||
event = models.ForeignKey(Event)
|
event = models.ForeignKey(Event)
|
||||||
typ = models.CharField(choices=PERSON_EVENT_CHOICES, max_length=128)
|
typ = models.CharField(choices=PERSON_EVENT_CHOICES, max_length=128, verbose_name='role')
|
||||||
|
|
||||||
|
|
||||||
GROUP_EVENT_CHOICES = (
|
GROUP_EVENT_CHOICES = (
|
||||||
|
|
|
@ -155,10 +155,14 @@ class PersonProductionForm(ItfForm):
|
||||||
|
|
||||||
class TheatreGroupProductionForm(ItfForm):
|
class TheatreGroupProductionForm(ItfForm):
|
||||||
#j pass an empty list,
|
#j pass an empty list,
|
||||||
#production = forms.ModelChoiceField([], widget=AutocompleteAddWidget(model_class=Production))
|
#production = forms.ModelChoiceField([], widget=AutocompleteAddWidget(model_class=Production))
|
||||||
|
script = forms.ModelChoiceField(Script.objects.all(), widget=AutocompleteAddWidget(model_class=Script))
|
||||||
|
director = forms.ModelChoiceField(Person.objects.all(), widget=AutocompleteAddWidget(model_class=Person))
|
||||||
|
playwright = forms.ModelChoiceField(Person.objects.all(), widget=AutocompleteAddWidget(model_class=Person))
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Production
|
model = Production
|
||||||
|
exclude = ('added_by',)
|
||||||
|
|
||||||
ProductionsTheatreGroupInline = itf_inlineformset_factory(TheatreGroup, Production, form=TheatreGroupProductionForm, extra=1, title="Productions")
|
ProductionsTheatreGroupInline = itf_inlineformset_factory(TheatreGroup, Production, form=TheatreGroupProductionForm, extra=1, title="Productions")
|
||||||
|
|
||||||
|
|
|
@ -32,12 +32,12 @@ $(function() {
|
||||||
<h3>{{ title }}</h3>
|
<h3>{{ title }}</h3>
|
||||||
<div><i> {{ oneliner }}</i></div>
|
<div><i> {{ oneliner }}</i></div>
|
||||||
<br/>
|
<br/>
|
||||||
<div>Type of Event: {{ event_type }}</div> <br/>
|
<div>Type of Event: {{ event_type|capfirst }}</div> <br/>
|
||||||
<div> {{ description }} </div>
|
<div> {{ description }} </div>
|
||||||
<br />
|
<br />
|
||||||
<div> {{ start_date|date:"jS M, Y" }} - {{ start_date|date:"jS M, Y" }} </div>
|
<div> {{ start_date|date:"jS M, Y" }}{% if end_date %} - {{ end_date|date:"jS M, Y" }} {% endif %}</div>
|
||||||
{% if start_time %}
|
{% if start_time %}
|
||||||
<div> {{ start_time|time:"P" }} - {{ end_time|time:"P" }}</div>
|
<div> {{ start_time|time:"P" }}{% if end_time %} - {{ end_time|time:"P" }} {% endif %}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br/>
|
<br/>
|
||||||
<div> {{ address }} </div>
|
<div> {{ address }} </div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user