argh, template render errors, catch
This commit is contained in:
parent
a691694a62
commit
ce8cedfdee
|
@ -82,13 +82,12 @@ class ItfModel(models.Model):
|
|||
|
||||
def insidepage_dict(self):
|
||||
if not exists(self.get_template_path()):
|
||||
return {
|
||||
'html': "Template for this model not found."
|
||||
}
|
||||
try:
|
||||
html = render_to_string(self.get_template_path(), self.info_dict())
|
||||
except:
|
||||
html = "Template render error."
|
||||
html = "Template not found."
|
||||
else:
|
||||
try:
|
||||
html = render_to_string(self.get_template_path(), self.info_dict())
|
||||
except:
|
||||
html = "Template render error."
|
||||
return {
|
||||
'url': self.get_absolute_url(),
|
||||
'title': self.get_title(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user