Пример #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))