Skip to content

Sample django project suitable for use with heroku. Uses twitter bootstrap and django-storages/boto for deploying static files to s3.

Notifications You must be signed in to change notification settings

eknuth/django-heroku-s3-bootstrap-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a sample project to demonstrate how to configure a heroku hosted django app to use s3 for static files. It uses the twitter bootstrap project to provide some boilerplate content.

You can read a description of the process in this blog post: http://iknuth.com/2011/10/deploying-a-django-app-to-heroku-with-easy-static-files-on-s3/

Instructions

Setup your environment.

  • virtualenv --no-site-packages . -p /usr/local/bin/python2.7
  • source bin/activate
  • pip install -r requirements.txt
  • createdb blogdemo

Run the project locally.

Deploy the project to heroku.

  • heroku create --stack cedar
  • git push heroku master
  • heroku run python om/manage.py syncdb

Create an s3 bucket and add your AWS keys and info to settings.py.

Deploy your static files

  • python om/manage.py collectstatic

This command is run locally. No need to involve heroku.

And you are ready to go

  • heroku open

About

Sample django project suitable for use with heroku. Uses twitter bootstrap and django-storages/boto for deploying static files to s3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages