initial commit
This commit is contained in:
Binary file not shown.
@@ -24,17 +24,19 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.humanize',
|
'django.contrib.humanize',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
|
||||||
|
|
||||||
# Third-party
|
|
||||||
'cloudinary',
|
'cloudinary',
|
||||||
'cloudinary_storage',
|
'cloudinary_storage',
|
||||||
|
'django.contrib.staticfiles',
|
||||||
'whitenoise.runserver_nostatic',
|
'whitenoise.runserver_nostatic',
|
||||||
|
|
||||||
# Local apps
|
|
||||||
'core.apps.CoreConfig',
|
'core.apps.CoreConfig',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
CLOUDINARY_STORAGE = {
|
||||||
|
'CLOUD_NAME': os.getenv('CLOUD_NAME'),
|
||||||
|
'API_KEY': os.getenv('API_KEY'),
|
||||||
|
'API_SECRET': os.getenv('API_SECRET'),
|
||||||
|
}
|
||||||
|
|
||||||
AUTH_USER_MODEL = 'core.User'
|
AUTH_USER_MODEL = 'core.User'
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@@ -95,9 +97,6 @@ STATIC_URL = "/static/"
|
|||||||
STATIC_ROOT = BASE_DIR / "staticfiles"
|
STATIC_ROOT = BASE_DIR / "staticfiles"
|
||||||
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
||||||
|
|
||||||
# Media (Cloudinary + fallback local)
|
|
||||||
MEDIA_URL = "/media/"
|
|
||||||
MEDIA_ROOT = BASE_DIR / "media" # Used locally if Cloudinary creds not set
|
|
||||||
|
|
||||||
cloudinary.config(
|
cloudinary.config(
|
||||||
cloud_name=os.getenv("CLOUD_NAME"),
|
cloud_name=os.getenv("CLOUD_NAME"),
|
||||||
|
|||||||
Reference in New Issue
Block a user