You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
394 B
23 lines
394 B
12 years ago
|
|
||
|
import json
|
||
|
from isso.models import Comment
|
||
|
|
||
|
# def prove(f):
|
||
|
|
||
|
# def dec(app, env, req, *args, **kwargs):
|
||
|
|
||
|
# pass
|
||
|
|
||
|
|
||
|
# def sign(response):
|
||
|
# pass
|
||
|
|
||
|
|
||
|
class IssoEncoder(json.JSONEncoder):
|
||
|
|
||
|
def default(self, obj):
|
||
|
if isinstance(obj, Comment):
|
||
|
return dict((field, value) for field, value in obj.iteritems())
|
||
|
|
||
|
return json.JSONEncoder.default(self, obj)
|