示例#1
0
 def handle(self, *args, **options):
     self.stdout.write("Syncing ...\n")
     sync = SyncServiceClass()
     try:
         r = sync.sync_expenses()
     except Exception, e:
         self.stdout.write("Error: %s\n" % str(e))
示例#2
0
def cmd_expenses(request):
    sync = SyncServiceClass()
    try:
        r = sync.sync_expenses()
    except Exception, e:
        ret = '{"success":false, err: "%s"}' % (str(e))