From 3343f14ab2aeec1d7efea532830061344a468764 Mon Sep 17 00:00:00 2001 From: Johnson Chetty Date: Wed, 15 Aug 2012 16:14:54 +0200 Subject: [PATCH] get_dict for TheatreGroup --- itf/itfprofiles/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/itf/itfprofiles/models.py b/itf/itfprofiles/models.py index d1c7b27..eaa7e91 100644 --- a/itf/itfprofiles/models.py +++ b/itf/itfprofiles/models.py @@ -266,6 +266,7 @@ class TheatreGroup(ItfModel): email = models.EmailField(blank=True, null=True) # location = models.ForeignKey(Location, blank=True, null=True, related_name="theatregroup_location") tel = models.IntegerField(blank=True, null=True) + # -- FIXME tel = models.CharField(blank=True, null=True) nature_of_work = models.ManyToManyField("GroupOccupation", blank=True, null=True, through="GroupGroupOccupation") languages = models.ManyToManyField("Language", blank=True, null=True) year_founded = models.IntegerField(blank=True, null=True) @@ -274,7 +275,7 @@ class TheatreGroup(ItfModel): buzzitems = generic.GenericRelation("BuzzItem") website = models.URLField(blank=True, verify_exists=False) # 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") about = models.TextField(blank=True, null=True) @@ -289,6 +290,10 @@ class TheatreGroup(ItfModel): return { 'name': self.name, 'about': self.about, + 'email': self.email, + 'tel':self.tel, + 'nature_of_work': [ obj for obj in self.nature_of_work_set.all()], + 'venues': [obj for obj in self.locations_set.alll()] } def get_title(self):