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(Relation, RelationAdmin)
|
||||||
admin.site.register(TheatreGroup, TheatreGroupAdmin)
|
admin.site.register(TheatreGroup, TheatreGroupAdmin)
|
||||||
admin.site.register(Person)
|
admin.site.register(Person)
|
||||||
|
admin.site.register(Language)
|
||||||
|
admin.site.register(Training)
|
||||||
|
admin.site.register(Production)
|
||||||
|
|
||||||
#class TalkAdmin(admin.ModelAdmin):
|
#class TalkAdmin(admin.ModelAdmin):
|
||||||
# inlines = [PadmaVideoInline, AudioInline, ImageInline, DocumentInline]
|
# inlines = [PadmaVideoInline, AudioInline, ImageInline, DocumentInline]
|
||||||
# save_on_top = True
|
# save_on_top = True
|
||||||
|
|
|
@ -229,15 +229,14 @@ class TheatreGroup(ItfModel):
|
||||||
website = models.URLField(blank=True, verify_exists=False)
|
website = models.URLField(blank=True, verify_exists=False)
|
||||||
resources = models.ManyToManyField("Resource", blank=True, null=True)
|
resources = models.ManyToManyField("Resource", blank=True, null=True)
|
||||||
locations = generic.GenericRelation("Location"),
|
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")
|
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)
|
about = models.TextField(blank=True, null=True)
|
||||||
#nature_of_work = models.CharField(max_length=255)
|
#nature_of_work = models.CharField(max_length=255)
|
||||||
founded = models.CharField(max_length=10)
|
founded = models.CharField(max_length=10)
|
||||||
trainings = models.ManyToManyField("Training", blank=True, null=True)
|
trainings = models.ManyToManyField("Training", blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
@ -248,17 +247,18 @@ class TheatreGroup(ItfModel):
|
||||||
'tel':self.tel,
|
'tel':self.tel,
|
||||||
'nature_of_work': [ obj for obj in self.nature_of_work.all().order_by('groupgroupoccupation__is_main')],
|
'nature_of_work': [ obj for obj in self.nature_of_work.all().order_by('groupgroupoccupation__is_main')],
|
||||||
'venues': [obj for obj in self.locations],
|
'venues': [obj for obj in self.locations],
|
||||||
'trainings': [obj for obj in self.trainings_set.all()],
|
'trainings': [obj for obj in self.trainings.all()],
|
||||||
'languages': [obj.name for obj in self.languages],
|
'languages': [obj.name for obj in self.languages.all()],
|
||||||
'venues': [obj for obj in self.locations],
|
'venues': [obj for obj in self.locations],
|
||||||
'founded': year_founded,
|
'founded': self.year_founded,
|
||||||
'about': self.about,
|
'about': self.about,
|
||||||
'awards': [obj for obj in self.awards],
|
'awards': [obj for obj in self.awards.all()],
|
||||||
'website': self.website,
|
'website': self.website,
|
||||||
'resources': [obj for obj in self.resources],
|
'resources': [obj for obj in self.resources.all()],
|
||||||
'buzzitems': [obj for obj in self.buzzitems],
|
'buzzitems': [obj for obj in self.buzzitems.all()],
|
||||||
'productions': [obj for obj in self.productions_set.all() ],
|
'productions': [obj for obj in self.production_set.all() ],
|
||||||
'scripts': [obj for obj in self.scripts_set.all() ],
|
'scripts': [obj for obj in self.script_set.all() ],
|
||||||
|
'people' : [obj for obj in self.person_set.all() ],
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_title(self):
|
def get_title(self):
|
||||||
|
|
|
@ -10,47 +10,169 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="about" class="tab_content">
|
<div id="about" class="tab_content">
|
||||||
|
<h2> {{ name }}</h2>
|
||||||
|
|
||||||
A brief bio and a history of work. should be able to add photos here
|
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 %}
|
{% if about %}
|
||||||
<div id="" class="">
|
<div id="" class="">
|
||||||
{{ about }}
|
{{ about }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% if nature_of_work %}
|
{% if nature_of_work %}
|
||||||
<div id="" class="">
|
<div id="" class="">
|
||||||
|
<ul>
|
||||||
{% for work in nature_of_work %}
|
{% for work in nature_of_work %}
|
||||||
|
<li>{{ work }}</li>
|
||||||
{{ work }} : {{ work.is_main }}
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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>
|
||||||
|
|
||||||
|
|
||||||
<div id="people" class="tab_content">
|
<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.
|
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>
|
||||||
|
|
||||||
<div id="production" class="tab_content">
|
<div id="production" class="tab_content">
|
||||||
Title of each production links to "Productions" page.
|
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>
|
||||||
|
|
||||||
<div id="gallery" class="tab_content">
|
<div id="gallery" class="tab_content">
|
||||||
Photos & Videos. There should be a clear demarcation between Photos and Videos
|
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>
|
||||||
|
|
||||||
<div id="resources" class="tab_content">
|
<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
|
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>
|
||||||
|
|
||||||
<div id="notes" class="tab_content">
|
<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.
|
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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user