File diff 7da9d5cfe1ec → fc2c3a6b4339
accounting/transport.py
Show inline comments
 
# Part of accounting-api project:
 
# https://gitorious.org/conservancy/accounting-api
 
# License: AGPLv3-or-later
 

	
 
from datetime import datetime
 

	
 
from flask import json
 

	
 
from accounting.models import Amount, Transaction, Posting, Account
 

	
 

	
 
class AccountingEncoder(json.JSONEncoder):
 
    def default(self, o):
 
        if isinstance(o, Account):
 
            return dict(
 
                __type__=o.__class__.__name__,