GitXplorerGitXplorer
i

django-storages-boto3-demo

public
1 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
eb9b9b6086696185ff1174437baf5c11f6287950

Implement images app with django-storages using S3 with Boto3

iitamaro committed 7 years ago
Unverified
b4d7ff9b5243c829f08f5fd0f2b0d27f326d9cc7

Use Libcloud as Django storages backend, with S3 & Tencent COS providers

iitamaro committed 7 years ago
Unverified
2e2cc2d50d1ffb77246baefc67fd6b41099ca69d

Add storages app and configure it to use S3 via Boto3

iitamaro committed 7 years ago
Unverified
9e92bfcb2135bba87ab47b43cbb4b111e1f83299

Heroku-Django starter project

iitamaro committed 7 years ago

README

The README file for this repository.

Django Storages S3Boto3 Demo

A demo Django app using django-storages with S3Boto3 backend to display images from S3 bucket, uploaded from admin interface.

Running Locally

Make sure you have Python installed properly. Also, install the Heroku Toolbelt and Postgres.

$ git clone git@github.com:itamaro/django-storages-boto3-demo.git
$ cd django-storages-boto3-demo

$ pipenv install

$ createdb django_storages_boto3

$ pipenv run python manage.py migrate
$ pipenv run python manage.py createsuperuser
$ pipenv run python manage.py collectstatic
$ cat <<EOF >.env
AWS_ACCESS_KEY="<Access-Key>"
AWS_SECRET_KEY="<Secret-Key>"
AWS_S3_BUCKET="S3-Bucket"
EOF

$ pipenv run heroku local -p 8000 web

Your app should now be running on localhost:8000.

Deploying to Heroku

$ heroku create
$ git push heroku master

$ heroku run python manage.py migrate
$ heroku run python manage.py createsuperuser
$ heroku config:set \
    AWS_ACCESS_KEY="<Access-Key>" \
    AWS_SECRET_KEY="<Secret-Key>" \
    AWS_S3_BUCKET="S3-Bucket"
$ heroku open

or

Deploy

Using the Demo

Using the admin interface (with the credentials of the superuser created), create "UploadedImage" records, uploading images from your local machine, then view the images ob the home page of the app.

Documentation

For more information about using Python on Heroku, see these Dev Center articles: