Esempio n. 1
0
 def POST(self):
     i = web.input(action=None)
     
     # Sanitize
     action = None
     actions = ['updateall']
     if i.action in actions:
         action = i.action
         
     if action == 'updateall':
         borrow.update_all_loan_status()
     raise web.seeother(web.ctx.path) # Redirect to avoid form re-post on re-load
Esempio n. 2
0
 def POST(self):
     i = web.input(action=None)
     
     # Sanitize
     action = None
     actions = ['updateall']
     if i.action in actions:
         action = i.action
         
     if action == 'updateall':
         borrow.update_all_loan_status()
     raise web.seeother(web.ctx.path) # Redirect to avoid form re-post on re-load
Esempio n. 3
0
def main():
    try:
        cmd = sys.argv[1]
    except IndexError:
        cmd = "help"

    if cmd == "update-loans":
        borrow.update_all_loan_status()
    elif cmd == "update-waitinglist":
        waitinglist.update_waitinglist(sys.argv[2])
    else:
        usage()
Esempio n. 4
0
def main():
    try:
        cmd = sys.argv[1]
    except IndexError:
        cmd = "help"

    if cmd == "update-loans":
        borrow.update_all_loan_status()
    elif cmd == "update-waitinglist":
        waitinglist.update_waitinglist(sys.argv[2])
    else:
        usage()
Esempio n. 5
0
def main():
    try:
        cmd = sys.argv[1]
    except IndexError:
        cmd = "help"

    if cmd == "update-loans":
        borrow.update_all_loan_status()
    elif cmd == "update-waitinglists":
        waitinglist.prune_expired_waitingloans()
    else:
        help()