Skip to content

Instantly share code, notes, and snippets.

@mitchtabian
Last active February 22, 2024 01:58
Show Gist options
  • Select an option

  • Save mitchtabian/17d97370d92d1dfdeaca40fa94c1e227 to your computer and use it in GitHub Desktop.

Select an option

Save mitchtabian/17d97370d92d1dfdeaca40fa94c1e227 to your computer and use it in GitHub Desktop.
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'
@WorldAdon
Copy link
Copy Markdown

i am using .scss files and to generate .css codes

@mobapps123
Copy link
Copy Markdown

how to manage media file in s3

@mobapps123
Copy link
Copy Markdown

plz write here to manage media files Sir

@mobapps123
Copy link
Copy Markdown

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