本文整理匯總了Python中models.Config.mkconfig方法的典型用法代碼示例。如果您正苦於以下問題:Python Config.mkconfig方法的具體用法?Python Config.mkconfig怎麽用?Python Config.mkconfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models.Config
的用法示例。
在下文中一共展示了Config.mkconfig方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: dash
# 需要導入模塊: from models import Config [as 別名]
# 或者: from models.Config import mkconfig [as 別名]
def dash(self, **params):
config = Config.readconfig()
# Attempts to read the config.
if config == 0:
# Else it uses the Arguements to create a config.
# organises make config data
data = {str(key):str(value) for key,value in params.items()}
url = []
for i, v in data.items():
url.append(v)
# makes config
Config.mkconfig(url)
else:
# If True it saves the data to a variable
URLS = config["URLS"]
refresh = config["refresh"]
# Runs the script in the Parsing Model. Parses the XML Files from URL
parse = Parsing.system()
refresh = config["refresh"]
# Returns the template with Parsed XML Data and The Refresh Integer from the Config.
return self.render_template('home/dash.html', template_vars={'data': parse, 'refresh': refresh})