1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Updated to new pyhp

This commit is contained in:
Krateng 2019-10-24 20:51:49 +02:00
parent b955777637
commit 3746111ee8
4 changed files with 5 additions and 9 deletions

View File

@ -8,3 +8,5 @@ caching:
folder: "cache/"
regular:
autostart: false
pyhp:
version: 2

View File

@ -1,6 +1,6 @@
bottle>=0.12.16
waitress>=1.3
doreah>=1.1.7
doreah>=1.2
nimrodel>=0.4.9
setproctitle>=1.1.10
wand>=0.5.4

View File

@ -149,15 +149,8 @@ def static_html(name):
keys = remove_identical(FormsDict.decode(request.query))
# if a pyhp file exists, use this
if os.path.exists("website/" + name + ".pyhp"):
if os.path.exists("website/" + name + ".pyhp") and settings.get_settings("USE_PYHP"):
from doreah.pyhp import file
#try:
# d = SourceFileLoader(name,"website/" + name + ".py").load_module().pyhp(keys)
# print("loaded dict")
#except:
# d = {}
# print("error")
# raise
environ = {} #things we expose to the pyhp pages
# maloja

View File

@ -56,3 +56,4 @@ NAME = "Generic Maloja User"
[Misc]
EXPERIMENTAL_FEATURES = no
USE_PYHP = no