Add def catch-all to NullJsonTemplate.

This fixes AttributeErrors when trying to render about pages as .json.
This commit is contained in:
Max Goodman
2012-06-06 17:00:04 -07:00
parent 7468c1bbb8
commit 6a861eb17d

View File

@@ -484,6 +484,9 @@ class NullJsonTemplate(JsonTemplate):
def render(self, thing = None, *a, **kw):
return ""
def get_def(self, name):
return self
class ListingJsonTemplate(ThingJsonTemplate):
_data_attrs_ = dict(children = "things",
after = "after",