From 9034535cc60e98b7fe2ac0b3088ca7f60619485c Mon Sep 17 00:00:00 2001 From: Bryan Gerlach Date: Tue, 8 Oct 2024 14:09:44 -0500 Subject: [PATCH] image stuff --- rdgen/settings.py | 2 +- rdgenerator/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rdgen/settings.py b/rdgen/settings.py index 322e9a5..74aca81 100644 --- a/rdgen/settings.py +++ b/rdgen/settings.py @@ -29,7 +29,7 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'media') # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = False +DEBUG = True ALLOWED_HOSTS = ['*'] diff --git a/rdgenerator/views.py b/rdgenerator/views.py index 15045a4..30f7908 100644 --- a/rdgenerator/views.py +++ b/rdgenerator/views.py @@ -309,9 +309,9 @@ def startgh(request): return HttpResponse('') def save_png(file, uuid, domain): - file_save_path = "png/%s/%s" % uuid, file.name + file_save_path = "png/%s/%s" % (uuid, file.name) Path("png/%s" % uuid).mkdir(parents=True, exist_ok=True) with open(file_save_path, "wb+") as f: for chunk in file.chunks(): f.write(chunk) - return "%s/%s" % domain, file_save_path \ No newline at end of file + return "%s/%s" % (domain, file_save_path) \ No newline at end of file