Comments (1)
The major steps to integrating S3 into your django site are:
- signup for s3 and create a bucket (store your bucket name in your env)
- get your AWS Access Key and Secret Key (store both in your env)
- Setting your DEFAULT_FILE_STORAGE AND STATIC_FILE_STORAGE in your settings
documentation: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html
STATICFILES_STORAGE = config("STATICFILES_STORAGE")
DEFAULT_FILE_STORAGE = config("DEFAULT_FILE_STORAGE")
here's what your .env file looks like in your two environments
production:
STATICFILES_STORAGE='storages.backends.s3boto3.S3ManifestStaticStorage'
DEFAULT_FILE_STORAGE="storages.backends.s3boto3.S3Boto3Storage"
local machine:
STATICFILES_STORAGE="whitenoise.storage.CompressedManifestStaticFilesStorage"
DEFAULT_FILE_STORAGE="django.core.files.storage.FileSystemStorage"
That's it!
You can also test this using the examples in the documentation or by setting your storage backends to the production backends.
from django-ecommerce.
Related Issues (20)
- Add a payment system
- Give app SaaS capability by adding a Store model & FK HOT 1
- Create the main page for the Admin Panel HOT 5
- Add a Product Admin
- Add a Order Admin
- Implement django-allauth
- Homepage should probably be a list of stores HOT 2
- Write tests for product admin HOT 1
- Checkout Django Crispy Forms HOT 1
- Review Overview on GitHub Actions and complete the following tasks HOT 1
- Fix broken tests HOT 2
- Update Checkout Logic
- Add a signup link
- Add a button to create a store
- Consider adding ipdb to project
- Deploy HOT 1
- Share project with Pybites community in circle
- Enhance the Order model with a 'paid_on' field.
- Write tests for create a store workflow HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-ecommerce.