productions

This commit is contained in:
Sanjay B 2013-08-12 16:25:30 +05:30
parent a6ca7d815c
commit 35f512353b
2 changed files with 60 additions and 18 deletions

View File

@ -449,9 +449,13 @@ class Production(ItfModel):
def get_dict(self):
from events.models import Event
rel_level1 = [obj for obj in Production.objects.filter(script=self.script)]
rel_level2 = list(set(obj.production_set.all() for obj in self.script.related_scripts.all()))
shows = Event.objects.filter(production=self)
last_date = None
if shows.count() > 0:
last_date = shows.order_by('-start_date')[0].start_date
return {
'name': self.name,
'anecdotes': self.anecdotes,
@ -463,6 +467,7 @@ class Production(ItfModel):
'awards': [ obj for obj in self.awards.all()],
'languages': [ obj for obj in self.languages.all()],
'debut_date':self.debut_date,
'last_date': last_date,
'sibling_productions': rel_level1,
'related_productions' : rel_level2,
'people': self.get_people()

View File

@ -58,46 +58,81 @@ $(function() {
<h3 class="borderYellow paddingBottom">{{ name }}</h3>
{% if group %} <div class="paddingTop"><strong>Group: </strong>{{ group.name }}</div> {% endif %}
<div><strong>Languages: </strong>Hindi, English, etc.</div>
<div>From 2011 to 2013</div>
<div><strong>No of Shows: </strong>range/number</div>
{% if languages %}
<div><strong>Languages: </strong>
{% for language in languages %}
{{ language.name }}
{% endfor %}
</div>
{% endif %}
<div>From {{ debut_date|date:"Y" }} {% if last_date %} - {{ last_date|date:"Y" }} </div>
{% comment %}
<div><strong>No of Shows: </strong> </div>
<div class="borderYellow"> <a href="" class="toggleLink rightFloat">Book Now>></a>
<br /><br />
{% endcomment %}
</div>
<br />
<div><strong>Writers: </strong> Name (playwright), name (adaptation), name (translation)</div>
<div><strong>Director: </strong>Hindi, English, etc.</div>
<div><strong>Credits: name (research), name (music)</strong></div>
{% if playwright %}
<div><strong>Writer: </strong>
<a href="{{ playwright.get_absolute_url }}" target="_blank">
{{ playwright }}
</a>
</div>
{% endif %}
{% if director %}
<div><strong>Director: </strong>
{% if director %}
<a href="{{ director.get_absolute_url }}" target="_blank">
{{ director }}
</a>
{% endif %}
</div>
<!-- <div><strong>Credits: name (research), name (music)</strong></div> -->
<div class="borderYellow"> <a href="" class="toggleLink rightFloat">See full credits>></a><br /><br /></div>
<br />
<div>
<p>Some copy here that is a synopsis in a paragraph. Some copy here that is a synopsis in a paragraph.
Some copy here that is a synopsis in a paragraph. Some copy here that is a synopsis in a paragraph.</p>
<p>
{{ synopsis|linebreaksbr }}
</p>
</div>
<div class="borderYellow">
<a href="">Contact</a>
<div>Group website</div>
<!-- <a href="">Contact</a> -->
{% if group.website %}
<div>Group website: <a href="{{ group.website }}" target="_blank">{{ group.website }}</a> </div>
{% endif %}
<br />
</div>
<br />
{% if awards %}
<div class="borderYellow">
<h5 class="orangeInnerRight">Awards</h5>
<div>Name of award, name of awardee, year, link</div>
<div>Name of award, name of awardee, year, link</div>
<div>Name of award, name of awardee, year, link</div>
<div>Name of award, name of awardee, year, link</div>
{% for award in awards %}
<div>
{{ award.title }}
{% if award.year %},
{{ award.year }}
{% endif %}
{% if award.link %},
<a href="{{ award.link }}" target="_blank">link</a>
{% endif %}
</div>
{% endfor %}
<br />
</div>
{% endif %}
<br />
<!--
<h5 class="orangeInnerRight">Links</h5>
<a href="">Link to article</a>
<div>One line desc</div>
@ -108,6 +143,7 @@ $(function() {
<a href="">Link to article</a>
<div>One line desc</div>
<br />
-->
</div> <!-- end about -->
<div id="cast" class="tab_content">
@ -115,13 +151,14 @@ $(function() {
<div id="gallery" class="tab_content">
{% include 'includes/media_gallery.html' %}
<!--
<h3 class="orange">Links</h3>
<div><a href="">Link</a></div>
<div><a href="">Link</a></div>
<div><a href="">Link</a></div>
<div><a href="">Link</a></div>
<a href="" class="rightFloat">More>></a>
-->
</div> <!-- end gallery -->
<div id="buzz" class="tab_content">