def get_choices(app_state, items):
return [
{
"name": "<item name=\"{}\" created=\"{}\">".format(x["name"], x["created"]),
"value": x["name"],
"checked": x["name"] in app_state["collections"],
} for x in items
]
If checked is False for any of the choices, it displays all of the choices as if they were "checked": False, unless the value entry is removed and the name entry is x["name"].
For something like this:
where choices is made up of a list such as
If
checked
is False for any of the choices, it displays all of the choices as if they were"checked": False
, unless thevalue
entry is removed and thename
entry isx["name"]
.