def gather_device_info():
	devices = []
	bus = dbus.SystemBus()
	objects = get_managed_objects()
	all_devices = ( str( path ) for path, interfaces in objects.items() if DEVICE_INTERFACE in interfaces )
	for path, ifaces in objects.items():
		if ADAPTER_INTERFACE not in ifaces:
			continue
		device_list = [ d for d in all_devices if d.startswith( path + '/' ) ]
		for dev_path in device_list:
			dev = objects[dev_path]
			properties = dev[DEVICE_INTERFACE]
			rssi = None
			icon = None
			if 'RSSI' in properties:
				rssi = int( properties['RSSI'] )
			if 'Icon' in properties:
				icon = str( properties['Icon'] )
			alias = properties['Alias']
			address = properties['Address']
			paired = properties['Paired']
			connected = properties['Connected']
			devices.append( { 'alias': str( alias ), 'address': str( address ), 'rssi': rssi, 'icon': icon, 'paired': int( paired ), 'connected': int( connected ) } )

	return devices
This should be a crispy form that creates an item.
dataset/ETHPy150Open willdeberry/bjarkan/bjarkan/list_devices.py/gather_device_info--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/hqwebapp/views.py/CRUDPaginatedViewMixin.get_create_form