Renaming
@ -12,8 +12,8 @@ requires = [
|
|||||||
"lesscpy>=0.13"
|
"lesscpy>=0.13"
|
||||||
]
|
]
|
||||||
resources = [
|
resources = [
|
||||||
"website/*/*",
|
"web/*/*",
|
||||||
"website/*",
|
"web/*",
|
||||||
"data_files/*/*",
|
"data_files/*/*",
|
||||||
"data_files/.doreah"
|
"data_files/.doreah"
|
||||||
]
|
]
|
||||||
|
@ -46,7 +46,7 @@ MAIN_PORT = settings.get_settings("WEB_PORT")
|
|||||||
HOST = settings.get_settings("HOST")
|
HOST = settings.get_settings("HOST")
|
||||||
THREADS = 12
|
THREADS = 12
|
||||||
BaseRequest.MEMFILE_MAX = 15 * 1024 * 1024
|
BaseRequest.MEMFILE_MAX = 15 * 1024 * 1024
|
||||||
WEBFOLDER = pkg_resources.resource_filename(__name__,"website")
|
WEBFOLDER = pkg_resources.resource_filename(__name__,"web")
|
||||||
|
|
||||||
|
|
||||||
webserver = Bottle()
|
webserver = Bottle()
|
||||||
@ -58,8 +58,8 @@ pthjoin = os.path.join
|
|||||||
#for f in os.listdir(pthjoin(WEBFOLDER,"less")):
|
#for f in os.listdir(pthjoin(WEBFOLDER,"less")):
|
||||||
# css += lesscpy.compile(pthjoin(WEBFOLDER,"less",f))
|
# css += lesscpy.compile(pthjoin(WEBFOLDER,"less",f))
|
||||||
|
|
||||||
#os.makedirs("website/css",exist_ok=True)
|
#os.makedirs("web/css",exist_ok=True)
|
||||||
#with open("website/css/style.css","w") as f:
|
#with open("web/css/style.css","w") as f:
|
||||||
# f.write(css)
|
# f.write(css)
|
||||||
|
|
||||||
|
|
||||||
@ -215,9 +215,9 @@ def static_html(name):
|
|||||||
|
|
||||||
# If a python file exists, it provides the replacement dict for the html file
|
# If a python file exists, it provides the replacement dict for the html file
|
||||||
if os.path.exists(pthjoin(WEBFOLDER,name + ".py")):
|
if os.path.exists(pthjoin(WEBFOLDER,name + ".py")):
|
||||||
#txt_keys = SourceFileLoader(name,"website/" + name + ".py").load_module().replacedict(keys,DATABASE_PORT)
|
#txt_keys = SourceFileLoader(name,"web/" + name + ".py").load_module().replacedict(keys,DATABASE_PORT)
|
||||||
try:
|
try:
|
||||||
module = importlib.import_module(".website." + name,package="maloja")
|
module = importlib.import_module(".web." + name,package="maloja")
|
||||||
txt_keys,resources = module.instructions(keys)
|
txt_keys,resources = module.instructions(keys)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log("Error in website generation: " + str(sys.exc_info()),module="error")
|
log("Error in website generation: " + str(sys.exc_info()),module="error")
|
||||||
@ -242,7 +242,7 @@ def static_html(name):
|
|||||||
response.set_header("Link",",".join(linkheaders))
|
response.set_header("Link",",".join(linkheaders))
|
||||||
log("Generated page " + name + " in " + str(clock.stop()) + "s (Python+HTML)",module="debug")
|
log("Generated page " + name + " in " + str(clock.stop()) + "s (Python+HTML)",module="debug")
|
||||||
return html
|
return html
|
||||||
#return static_file("website/" + name + ".html",root="")
|
#return static_file("web/" + name + ".html",root="")
|
||||||
|
|
||||||
|
|
||||||
# Shortlinks
|
# Shortlinks
|
||||||
|
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 866 B |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@ -1,4 +1,4 @@
|
|||||||
@import "website/less/grisons";
|
@import "web/less/grisons";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
padding:15px;
|
padding:15px;
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |