Beispiel #1
0
def activate_pod():
    verify_auth(request)

    pod = Pod()
    archive_pod()
    pod.radio_address2 = get_next_pod_address()
    pod.Save(POD_FILE + POD_FILE_SUFFIX)

    pdm = get_pdm()
    pdm.activate_pod()
    save_activated_pod_address(pod.radio_address)
    return pod
Beispiel #2
0
def new_pod():
    verify_auth(request)

    pod = Pod()

    if request.args.get('id_lot') is not None:
        pod.id_lot = int(request.args.get('id_lot'))
    if request.args.get('id_t') is not None:
        pod.id_t = int(request.args.get('id_t'))
    if request.args.get('radio_address') is not None:
        pod.radio_address = int(request.args.get('radio_address'))
        pod.radio_address2 = int(request.args.get('radio_address'))

    archive_pod()
    pod.Save(POD_FILE + POD_FILE_SUFFIX)
    return pod