def show_devices(): if not session.get('logged_in'): flash('Need to login') return render_template('login.html') else: get_device = get_devices() for result in get_device.itervalues(): if "error" in str(result): error = get_devices() else: error = None templateData = {'error': error, 'devices': get_devices()} return render_template('devices.html', **templateData)
def show_devices(): if not session.get('logged_in'): flash('Need to login') return render_template('login.html') else: get_device = get_devices() for result in get_device.itervalues(): if "error" in str(result): error = get_devices() else: error = None templateData={ 'error' : error, 'devices' : get_devices() } return render_template('devices.html', **templateData)
def settings(): # Pass the template data into the template dashboard.html and return it to the user if not session.get('logged_in'): flash('Need to login') return render_template('login.html') else: templateData = { 'nodes': list_devices(), 'kodi': kodi.list(), 'zoneminder': zoneminder.list(), 'devices': get_devices(), 'schedule': schedule.list(), 'schedules': schedule.lists() } return render_template('settings.html', **templateData)
def settings(): # Pass the template data into the template dashboard.html and return it to the user if not session.get('logged_in'): flash('Need to login') return render_template('login.html') else: templateData = { 'nodes' : list_devices(), 'kodi' : kodi.list(), 'zoneminder' : zoneminder.list(), 'devices' : get_devices(), 'schedule' : schedule.list(), 'schedules' : schedule.lists() } return render_template('settings.html', **templateData)