Last active
February 22, 2024 01:58
-
-
Save mitchtabian/17d97370d92d1dfdeaca40fa94c1e227 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSTALLED_APPS = [ | |
# My apps | |
'personal', | |
'account', | |
'blog', | |
# django apps | |
'django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', | |
'storages' | |
] | |
AUTH_USER_MODEL = 'account.Account' | |
AWS_ACCESS_KEY_ID = 'M5YCPZP3QT36OWMMZS23' | |
AWS_SECRET_ACCESS_KEY = '5Npq/S/7tX2IqBl51p3QEAMJuuGvHuFH4680Cl59M3s' | |
AWS_STORAGE_BUCKET_NAME = 'open-api-space' | |
AWS_S3_ENDPOINT_URL = 'https://nyc3.digitaloceanspaces.com' | |
AWS_S3_OBJECT_PARAMETERS = { | |
'CacheControl': 'max-age=86400', | |
} | |
AWS_LOCATION = 'open-api-static' | |
STATICFILES_DIRS = [ | |
os.path.join(BASE_DIR, 'static'), | |
] | |
STATIC_URL = 'https://%s/%s/' % (AWS_S3_ENDPOINT_URL, AWS_LOCATION) | |
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' | |
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' |
when i hoste my website after hosting my static files on digitalocean spaces. images that i have used in my css file not get loaded. everything is working fine but the images that i have user in my css file as a background images not get load.
i have followed your tutorial how to host a django website with digitalocean. and everything is working perfectly insted of this one.
can you please help me.
i am using .scss files and to generate .css codes
how to manage media file in s3
plz write here to manage media files Sir
nice snippet
Sir How to Manage Media files Sir
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice snippet