From a85c029bbced0ce6fe301537be187b98fd6b3e14 Mon Sep 17 00:00:00 2001 From: Francesco Luzzana Date: Sun, 13 Mar 2022 14:44:40 +0100 Subject: [PATCH] test static files --- .gitmodules | 3 --- postit/contents | 1 - postit/dump.py | 2 +- postit/generate.py | 7 ------- postit/templates/postit.html | 2 +- 5 files changed, 2 insertions(+), 13 deletions(-) delete mode 160000 postit/contents diff --git a/.gitmodules b/.gitmodules index 7943337..4230954 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "postit/contents"] - path = postit/contents - url = https://git.xpub.nl/kamo/post-it-contents.git [submodule "postit/static/contents"] path = postit/static/contents url = https://git.xpub.nl/kamo/post-it-contents.git diff --git a/postit/contents b/postit/contents deleted file mode 160000 index 20cb7ef..0000000 --- a/postit/contents +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 20cb7eff9cba3dee5912d7893729b8a8490903f9 diff --git a/postit/dump.py b/postit/dump.py index c1af477..b3ff356 100644 --- a/postit/dump.py +++ b/postit/dump.py @@ -5,7 +5,7 @@ import os def dump(): # list all the folders - path = "postit/contents" + path = "postit/static/contents" folders = [ f.name for f in os.scandir(path) if f.is_dir() and f.name != "miri-the-leader" ] diff --git a/postit/generate.py b/postit/generate.py index b110c12..b9e1716 100644 --- a/postit/generate.py +++ b/postit/generate.py @@ -20,10 +20,3 @@ def postit(): contents = json.load(f) return render_template("postit.html", contents=contents) - - -@bp.route("///") -def send_static(slug=None, filename=None): - return send_from_directory( - f'{os.environ.get("URL_PREFIX")}/postit/contents/{slug}', filename - ) diff --git a/postit/templates/postit.html b/postit/templates/postit.html index 161cf0c..30485c6 100644 --- a/postit/templates/postit.html +++ b/postit/templates/postit.html @@ -13,7 +13,7 @@
{%if content['img'] %} {{content['description']}}
{{content['description']}}