minor changes in forms display, events template

This commit is contained in:
Sanjay B 2014-05-26 15:13:01 +05:30
parent 4c07664d0a
commit f5e7ebc2cc
3 changed files with 10 additions and 6 deletions

View File

@ -132,7 +132,7 @@ PERSON_EVENT_CHOICES = (
class PersonEvent(models.Model):
person = models.ForeignKey(Person)
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 = (

View File

@ -155,10 +155,14 @@ class PersonProductionForm(ItfForm):
class TheatreGroupProductionForm(ItfForm):
#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:
model = Production
exclude = ('added_by',)
ProductionsTheatreGroupInline = itf_inlineformset_factory(TheatreGroup, Production, form=TheatreGroupProductionForm, extra=1, title="Productions")

View File

@ -32,12 +32,12 @@ $(function() {
<h3>{{ title }}</h3>
<div><i> {{ oneliner }}</i></div>
<br/>
<div>Type of Event: {{ event_type }}</div> <br/>
<div>Type of Event: {{ event_type|capfirst }}</div> <br/>
<div> {{ description }} </div>
<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 %}
<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 %}
<br/>
<div> {{ address }} </div>