Good day. I'm just starting to get acquainted with Python and I am faced with the problem of uploading my own config.
index.py:
if os.path.exists(config["pagedir"] + params["id"] + ".py"): __import__(string.replace(config["pagedir"], "/", ".") + params["id"]) print page # не работает
pages / index.py:
page = { "tpl": "page.html", "title": "index", "html": "<b>Index</b> page" } #print page - работает даже после импорта
Actually, the question is: how to reach the page?
Thank you in advance.