aboutsummaryrefslogtreecommitdiffstats
path: root/edaweb
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2025-04-29 20:28:44 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2025-04-29 20:28:44 +0100
commit2159e47e287920c1a89188ba789329344e952034 (patch)
tree1678a24019c9f2b7ee193d97a0f4a11e743af565 /edaweb
parent0e8ada1eff8799437c9be1bc2af10d6198fa8cad (diff)
downloadeda.gay-2159e47e287920c1a89188ba789329344e952034.tar.gz
eda.gay-2159e47e287920c1a89188ba789329344e952034.zip
Various bug fixes
Diffstat (limited to 'edaweb')
-rw-r--r--edaweb/app.py4
-rw-r--r--edaweb/static/images/random.jpgbin0 -> 202536 bytes
2 files changed, 2 insertions, 2 deletions
diff --git a/edaweb/app.py b/edaweb/app.py
index 6902fe4..436df7a 100644
--- a/edaweb/app.py
+++ b/edaweb/app.py
@@ -17,7 +17,7 @@ import io
app = flask.Flask(__name__)
CONFIG = configparser.ConfigParser(interpolation = None)
-CONFIG.read("edaweb.conf")
+CONFIG.read(os.path.join(os.path.dirname(__file__), "edaweb.conf"))
shown_images = set()
shown_sidebar_images = set()
@@ -224,7 +224,7 @@ def serve_random():
sbi = services.get_random_image(tags)
req = urllib.request.Request(sbi.imurl)
mediaContent = urllib.request.urlopen(req).read()
- with open(os.path.join("static", "images", "random.jpg"), "wb") as f:
+ with open(os.path.join(os.path.dirname(__file__), "static", "images", "random.jpg"), "wb") as f:
f.write(mediaContent)
with database.Database() as db:
diff --git a/edaweb/static/images/random.jpg b/edaweb/static/images/random.jpg
new file mode 100644
index 0000000..4e23beb
--- /dev/null
+++ b/edaweb/static/images/random.jpg
Binary files differ