Beispiel #1
0
def proc_action(action):
    action['kind'] = action['action_kind'].partition('-')[0]
    action['static'] = static_with_kind(action['kind'])
    action['static_unbind'] = static_unbind_with_kind(action['kind'])
    return action
Beispiel #2
0
def binds(user):
    details = []
    for d in ACCOUNT_DETAILS:
        d['account'] = account_with_kind(d['kind'])
        d['static'] = static_with_kind(d['kind']) if binded_account(user, d['kind']) else static_unbind_with_kind(d['kind'])
        d['url'] = eval(d['account']).url()
        details.append(d)
    for d in UNAUTHENTICATED_ACCOUNT_DETAILS:
        d['static'] = static_with_kind(d['kind'])
        details.append(d)
    return details
Beispiel #3
0
 def static_unbind(self):
     return static_unbind_with_kind(self.kind.partition('-')[0])
Beispiel #4
0
def proc_trigger(trigger):
    trigger['kind'] = trigger['trigger_kind'].partition('-')[0]
    trigger['static'] = static_with_kind(trigger['kind'])
    trigger['static_unbind'] = static_unbind_with_kind(trigger['kind'])
    return trigger