diff --git a/home/models/home.py b/home/models/home.py index fa640de..116ea5e 100644 --- a/home/models/home.py +++ b/home/models/home.py @@ -1,5 +1,6 @@ from django.db import models from django.utils.translation import gettext as _ +from cloudinary_storage import Cl class About(models.Model): @@ -25,7 +26,7 @@ class Carousel(models.Model): Stores All carousel images on Home page """ - image = models.ImageField(_("Carousel Images"), upload_to="static/images") + image = models.ImageField(_("Carousel Images"), upload_to="static/images", storage=Cl) def __str__(self): return "Carousel Images" diff --git a/messWebsite/settings.py b/messWebsite/settings.py index 76b963e..389d9fb 100644 --- a/messWebsite/settings.py +++ b/messWebsite/settings.py @@ -183,6 +183,9 @@ STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / 'staticfiles' +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), +] # managing media CLOUDINARY_STORAGE = { "CLOUD_NAME": env("CLOUD_NAME"),