GitXplorerGitXplorer
i

django-storages-boto3-demo

public
1 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
1b2009adf3421a3d6b57f6059092f355d44bb7db

README cutoff

iitamaro committed 7 years ago
Unverified
ee5ff3a408d69ae73a565614a588f2d1e1f8bbde

Remove unused template, namespace hello-app templates

iitamaro committed 7 years ago
Unverified
e2a84ed10dd99df07047c935d392740057133474

Update index template for this app

iitamaro committed 7 years ago
Unverified
0c58985dde76087932e0c8d838a04f4da03bfada

Add AWS keys and super user creation to README

iitamaro committed 7 years ago
Unverified
39649ec11fc692b3c857cebf7ebd52cdb0e3cb9e

Update README - run heroku with pipenv, specify port

iitamaro committed 7 years ago
Unverified
f985eeb57f665cd79a91033139ba93993f88955c

Update README, add LICENSE

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: