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

Fixing and renaming

This commit is contained in:
krateng 2022-01-10 05:05:54 +01:00
parent eb9d29686b
commit b325fab698
2 changed files with 10 additions and 7 deletions

View File

@ -174,7 +174,10 @@ def add_scrobbles(scrobbleslist):
with engine.begin() as conn:
for op in ops:
try:
conn.execute(op)
except sql.exc.IntegrityError:
pass
### these will 'get' the ID of an entity, creating it if necessary

View File

@ -211,7 +211,7 @@ def static(name,ext):
### DYNAMIC
def static_html(name):
def jinja_page(name):
if name in aliases: redirect(aliases[name])
keys = remove_identical(FormsDict.decode(request.query))
@ -241,17 +241,17 @@ def static_html(name):
@webserver.route("/<name:re:admin.*>")
@auth.authenticated
def static_html_private(name):
return static_html(name)
def jinja_page_private(name):
return jinja_page(name)
@webserver.route("/<name>")
def static_html_public(name):
return static_html(name)
def jinja_page_public(name):
return jinja_page(name)
@webserver.route("")
@webserver.route("/")
def mainpage():
return static_html("start")
return jinja_page("start")
# Shortlinks