TheatreGroup model, template and getdict done. Major db change. db migration script added
This commit is contained in:
parent
f1c2347f4a
commit
847d968032
|
@ -43,6 +43,10 @@ admin.site.register(Occupation, OccupationAdmin)
|
|||
admin.site.register(Relation, RelationAdmin)
|
||||
admin.site.register(TheatreGroup, TheatreGroupAdmin)
|
||||
admin.site.register(Person)
|
||||
admin.site.register(Language)
|
||||
admin.site.register(Training)
|
||||
admin.site.register(Production)
|
||||
|
||||
#class TalkAdmin(admin.ModelAdmin):
|
||||
# inlines = [PadmaVideoInline, AudioInline, ImageInline, DocumentInline]
|
||||
# save_on_top = True
|
||||
|
|
|
@ -229,15 +229,14 @@ class TheatreGroup(ItfModel):
|
|||
website = models.URLField(blank=True, verify_exists=False)
|
||||
resources = models.ManyToManyField("Resource", blank=True, null=True)
|
||||
locations = generic.GenericRelation("Location"),
|
||||
# locations = models.ManyToManyField("Location", blank=True, null=True, related_name="theatregroup_locations")
|
||||
nature_of_work = models.ManyToManyField("GroupOccupation", blank=True, null=True, through="GroupGroupOccupation")
|
||||
# locations = models.ManyToManyField("Location", blank=True, null=True, related_name="theatregroup_locations")
|
||||
|
||||
about = models.TextField(blank=True, null=True)
|
||||
#nature_of_work = models.CharField(max_length=255)
|
||||
founded = models.CharField(max_length=10)
|
||||
trainings = models.ManyToManyField("Training", blank=True, null=True)
|
||||
|
||||
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
|
@ -248,17 +247,18 @@ class TheatreGroup(ItfModel):
|
|||
'tel':self.tel,
|
||||
'nature_of_work': [ obj for obj in self.nature_of_work.all().order_by('groupgroupoccupation__is_main')],
|
||||
'venues': [obj for obj in self.locations],
|
||||
'trainings': [obj for obj in self.trainings_set.all()],
|
||||
'languages': [obj.name for obj in self.languages],
|
||||
'trainings': [obj for obj in self.trainings.all()],
|
||||
'languages': [obj.name for obj in self.languages.all()],
|
||||
'venues': [obj for obj in self.locations],
|
||||
'founded': year_founded,
|
||||
'founded': self.year_founded,
|
||||
'about': self.about,
|
||||
'awards': [obj for obj in self.awards],
|
||||
'awards': [obj for obj in self.awards.all()],
|
||||
'website': self.website,
|
||||
'resources': [obj for obj in self.resources],
|
||||
'buzzitems': [obj for obj in self.buzzitems],
|
||||
'productions': [obj for obj in self.productions_set.all() ],
|
||||
'scripts': [obj for obj in self.scripts_set.all() ],
|
||||
'resources': [obj for obj in self.resources.all()],
|
||||
'buzzitems': [obj for obj in self.buzzitems.all()],
|
||||
'productions': [obj for obj in self.production_set.all() ],
|
||||
'scripts': [obj for obj in self.script_set.all() ],
|
||||
'people' : [obj for obj in self.person_set.all() ],
|
||||
}
|
||||
|
||||
def get_title(self):
|
||||
|
|
|
@ -10,47 +10,169 @@
|
|||
</ul>
|
||||
|
||||
<div id="about" class="tab_content">
|
||||
|
||||
<h2> {{ name }}</h2>
|
||||
|
||||
A brief bio and a history of work. should be able to add photos here
|
||||
|
||||
|
||||
{% if email %}
|
||||
<div id="" class="">
|
||||
{{ email }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if tel %}
|
||||
<div id="" class="">
|
||||
{{ tel }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if founded %}
|
||||
<div id="" class="">
|
||||
{{ founded }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if website %}
|
||||
<div id="" class="">
|
||||
{{ website }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if about %}
|
||||
<div id="" class="">
|
||||
{{ about }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{% if nature_of_work %}
|
||||
<div id="" class="">
|
||||
<ul>
|
||||
{% for work in nature_of_work %}
|
||||
|
||||
{{ work }} : {{ work.is_main }}
|
||||
|
||||
<li>{{ work }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if trainings %}
|
||||
<div id="" class="">
|
||||
Trainings:
|
||||
<ul>
|
||||
{% for training in trainings %}
|
||||
<li>{{ training }} </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if venues %}
|
||||
<div id="" class="">
|
||||
<ul>
|
||||
{% for elem in venues %}
|
||||
<li> {{ elem.name }} </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if buzzitems %}
|
||||
<div id="" class="">
|
||||
<ul>
|
||||
{% for elem in buzzitems %}
|
||||
<li>{{ elem }} </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="people" class="tab_content">
|
||||
Active Members, Associates, (Fans? - maybe this is a link with a list popout, so they are not perceived as internal to the group). Photos of users on site should show up. We must SEE the community. Noel needs to send a design for tha tab, which will be used across all "People" tabs.
|
||||
|
||||
{% if people %}
|
||||
<div id="" class="">
|
||||
<ul>
|
||||
{% for person in people %}
|
||||
<li> {{ person }} </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div id="production" class="tab_content">
|
||||
Title of each production links to "Productions" page.
|
||||
|
||||
{% if productions %}
|
||||
<div id="" class="">
|
||||
<ul>
|
||||
{% for prod in productions %}
|
||||
<li>{{ prod }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div id="gallery" class="tab_content">
|
||||
Photos & Videos. There should be a clear demarcation between Photos and Videos
|
||||
|
||||
{% if awards %}
|
||||
<div id="" class="">
|
||||
<ul>
|
||||
{% for elem in awards %}
|
||||
<li>{{ elem }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div id="resources" class="tab_content">
|
||||
books, CDs, DVDs, scripts - anything the group owns. This can be images, text or links. backend - user should be asked to label the item. Optional
|
||||
|
||||
|
||||
{% if resources %}
|
||||
<div id="" class="">
|
||||
<ul>
|
||||
{% for elem in resources %}
|
||||
<li>{{ elem }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="notes" class="tab_content">
|
||||
Anything about the group (annotations & anecdotes in a sense). Anybody can add. These are scripts owned by the group. i.e the group is the author.
|
||||
|
||||
{% if scripts %}
|
||||
<div id="" class="">
|
||||
<ul>
|
||||
{% for elem in scripts %}
|
||||
<li>{{ elem }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user