export past and current functions in deputy json

This commit is contained in:
Frédéric Péters 2012-04-11 10:32:31 +02:00
parent 1557271769
commit d761ba6535
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ class DeputyJson(BrowserView):
d['work_address'] = self.context.work_address.as_dict(),
if self.context.work_address_2:
d['work_address_2'] = self.context.work_address_2.as_dict()
if self.context.current_functions and self.context.current_functions.raw:
d['current_functions'] = self.context.current_functions.raw
if self.context.past_functions and self.context.past_functions.raw:
d['past_functions'] = self.context.past_functions.raw
self.request.response.setHeader('Content-type', 'application/json')
return json.dumps(d)