Ejemplo 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)
Ejemplo n.º 2
0
def add_location(name):
    whileLoop = 0
    while whileLoop == 0:
        name = str(name)
        locations = get_location()
        locations.append(name)
        write_location(locations)
        whileLoop = 1
    redirect('/')
Ejemplo n.º 3
0
def del_location(name):
    whileLoop = 0
    while whileLoop == 0:
        name = str(name)
        if "_" in name:
            name = name.replace("_"," ")
        locations = list(get_location())
        locations.remove(name)
        write_location(locations)
        whileLoop = 1
    redirect('/')
Ejemplo n.º 4
0
def form_del_location():
    Locations = get_location()
    return template('del_location', POSTURL="/del/location", locations=Locations)