comparison sat/plugins/plugin_xep_0346.py @ 3460:d4a71a1dac88

plugin misc lists: templates: Templates are a way to create lists with pre-filled schemas.
author Goffi <goffi@goffi.org>
date Fri, 19 Feb 2021 15:49:58 +0100
parents 6791103de47d
children cc065c13052c
comparison
equal deleted inserted replaced
3459:8dc26e5edcd3 3460:d4a71a1dac88
319 items_xmlui = [] 319 items_xmlui = []
320 for item_elt in items: 320 for item_elt in items:
321 for x_elt in item_elt.elements((data_form.NS_X_DATA, "x")): 321 for x_elt in item_elt.elements((data_form.NS_X_DATA, "x")):
322 form = data_form.Form.fromElement(x_elt) 322 form = data_form.Form.fromElement(x_elt)
323 if form_ns and form.formNamespace != form_ns: 323 if form_ns and form.formNamespace != form_ns:
324 log.debug(
325 f"form's namespace ({form.formNamespace!r}) differs from expected"
326 f"{form_ns!r}"
327 )
324 continue 328 continue
325 prepend = [ 329 prepend = [
326 ("label", "id"), 330 ("label", "id"),
327 ("text", item_elt["id"], "id"), 331 ("text", item_elt["id"], "id"),
328 ("label", "publisher"), 332 ("label", "publisher"),