This commit is contained in:
Sanj 2011-09-10 08:33:22 +05:30
parent 7f785f3ff8
commit 4d0e8fee31
3 changed files with 8 additions and 8 deletions

View File

@ -81,13 +81,10 @@ class ItfModel(models.Model):
return self.get(self._get_fields().keys())
def insidepage_dict(self):
if not exists(self.get_template_path()):
html = "Template not found at: " + self.get_template_path()
else:
try:
html = render_to_string(self.get_template_path(), self.info_dict())
except:
html = "Template render error."
try:
html = render_to_string(self.get_template_path(), self.info_dict())
except:
html = "Template path not found at : " + self.get_template_path()
return {
'url': self.get_absolute_url(),
'title': self.get_title(),

View File

@ -80,6 +80,9 @@ class Participant(ItfModel):
def __unicode__(self):
return self.name
def get_title(self):
return self.title
def list_dict(self):
return {
'id': self.id,
@ -91,7 +94,7 @@ class Participant(ItfModel):
'id': self.id,
'name': self.name,
'title': self.title,
'short_bio': self.short_bio,
'short_bio': self.short_bio
}
class Talk(models.Model):