fix static files

This commit is contained in:
Ross
2023-02-13 11:40:00 +00:00
parent 83fe8b4ae0
commit 8a5bd44166
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -1,4 +1,5 @@
import json
from pathlib import Path
from rad.settings import REMOTE_URL
from django.db.models.fields.files import ImageField
from django.db.models.fields.related import ForeignKey
@@ -259,6 +260,9 @@ class Long(models.Model):
self.question_json_id += 1
# Make sure path exists (we should probably just do this once on startup)
Path(path).parents[0].mkdir(parents=True, exist_ok=True)
with open(path, "w+") as f:
print("start writing file")