def load_config(category, section): conf = None if category == "general": conf = PYLOAD.getConfigDict() elif category == "plugin": conf = PYLOAD.getPluginConfigDict() for key, option in conf[section].iteritems(): if key in ("desc", "outline"): continue if ";" in option['type']: option['list'] = option['type'].split(";") option['value'] = decode(option['value']) return render_to_response( "settings_item.html", { "sorted_conf": lambda c: sorted(c.items(), key=lambda i: i[1]['idx'] if i[0] not in ("desc", "outline") else 0), "skey": section, "section": conf[section] })
def load_config(category, section): conf = None if category == "general": conf = PYLOAD.getConfigDict() elif category == "plugin": conf = PYLOAD.getPluginConfigDict() for key, option in conf[section].iteritems(): if key in ("desc", "outline"): continue if ";" in option['type']: option['list'] = option['type'].split(";") option['value'] = decode(option['value']) return render_to_response("settings_item.html", {"skey": section, "section": conf[section]})
def load_config(category, section): conf = None if category == "general": conf = PYLOAD.getConfigDict() elif category == "plugin": conf = PYLOAD.getPluginConfigDict() for key, option in conf[section].iteritems(): if key in ("desc", "outline"): continue if ";" in option["type"]: option["list"] = option["type"].split(";") option["value"] = decode(option["value"]) return render_to_response("settings_item.html", { "skey": section, "section": conf[section] })