Esempio n. 1
0
def create_get():
    devices = get_data().keys()
    staff = get_people()['staff']
    teachers = get_people()['teachers']
    students = get_people()['students']
    locations = get_location()
    dataFields = ['Router','Switch','Barrix','Software - Individual', 'Software - Subscription','Hub','Desktop Computer','Laptop','Projector','Speakers','Television - CRT', 'Television - LCD', 'Phone', 'DVD Player', 'VCR', 'Printer', 'Other']
    return template('generate', dataFields=dataFields, devices=devices, staff=staff, teachers=teachers, students=students, locations=locations)
Esempio n. 2
0
def add_person(name, role):
    if role == 'students':
        people = get_people()
        people['students'].append(name)
        write_people(people)
        redirect('/added/' + name + '/' + role)
    elif role == 'teachers':
        people = get_people()
        people['teachers'].append(name)
        write_people(people)
        redirect('/added/' + name + '/' + role)
    elif role == 'staff':
        people = get_people()
        people['staff'].append(name)
        write_people(people)
        redirect('/added/' + name + '/' + role)
    else:
        redirect('/')
Esempio n. 3
0
def form_edit_person():
    people = get_people()
    teachers = people['teachers']
    staff = people['staff']
    students = people['students']
    return template('edit_person',teachers=teachers,staff=staff,students=students)