add template for participants

This commit is contained in:
Sanj 2011-09-10 08:05:18 +05:30
parent b91da77acf
commit bbf9f4b19a

View File

@ -71,7 +71,7 @@ class Meeting(ItfModel):
meeting_data['participants'] = Participant.objects.filter(meeting__id=meeting_id).order_by('name') meeting_data['participants'] = Participant.objects.filter(meeting__id=meeting_id).order_by('name')
return meeting_data return meeting_data
class Participant(models.Model): class Participant(ItfModel):
name = models.CharField(max_length=255) name = models.CharField(max_length=255)
title = models.CharField(max_length=255, blank=True, null=True) title = models.CharField(max_length=255, blank=True, null=True)
short_bio = models.TextField(max_length=255, blank=True, null=True) short_bio = models.TextField(max_length=255, blank=True, null=True)
@ -80,6 +80,19 @@ class Participant(models.Model):
def __unicode__(self): def __unicode__(self):
return self.name return self.name
def list_dict(self):
return {
'id': self.id,
'title': self.title
}
def info_dict(self):
return {
'id': self.id,
'title': self.title,
'short_bio': self.short_bio,
}
class Talk(models.Model): class Talk(models.Model):
title = models.CharField(max_length=255) title = models.CharField(max_length=255)
intro = models.TextField(blank=True, null=True) intro = models.TextField(blank=True, null=True)