This commit is contained in:
Ross
2021-02-15 11:47:49 +00:00
parent fd34d7b1e6
commit fafcb1c1a4
2 changed files with 23 additions and 3 deletions
+3 -3
View File
@@ -20,15 +20,15 @@ from helpers.images import image_as_base64
image_storage = FileSystemStorage(
# Physical file location ROOT
location=u"{0}/anatomy/".format(settings.MEDIA_ROOT),
location=u"{0}/".format(settings.MEDIA_ROOT),
# Url for file
base_url=u"{0}anatomy/".format(settings.MEDIA_URL),
base_url=u"{0}/".format(settings.MEDIA_URL),
)
def image_directory_path(instance, filename):
# file will be uploaded to MEDIA_ROOT/anatomy/picture/<filename>
return u"picture/{0}".format(filename)
return u"picture/anatomy/{0}".format(filename)
class BodyPart(models.Model):