equal
deleted
inserted
replaced
|
1 import json |
|
2 |
|
3 class JSONMixin: |
|
4 MIMETYPE = 'application/json' |
|
5 |
|
6 def render_json(self, **parms): |
|
7 raise NotImplementedError() |
|
8 |
|
9 def render_response(self, **params): |
|
10 data = self.render_json(**params) |
|
11 |
|
12 return json.dumps(data) |
|
13 |