diff --git a/Makefile b/Makefile index c11587e..36d9b26 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ MANAGEPY=foreman run env/bin/python manage.py update: virtualenv env - env/bin/pip install -r requirements.txt + env/bin/pip install -r localrequirements.txt $(MANAGEPY) syncdb $(MANAGEPY) migrate diff --git a/README.md b/README.md index ad6fd5f..9f35988 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,14 @@ How-To * Clone the repo. * Add a git remote called ``heroku`` pointing at ``git@heroku.com:insertcreativenamehere.git``. -* Create a file called .env and add two values: ``DATABASE_URL=sqlite://localhost/local.db`` and ``DEBUG=True``. +* Create a file called .env and add: ``DATABASE_URL=sqlite://localhost/local.db``, ``SECRET_KEY=`` and ``DEBUG=True``. * Create a GitHub app on https://github.com/settings/applications setting both urls to http://localhost:8000/. * Add ``GITHUB_APP_SECRET`` and ``GITHUB_APP_ID`` to your .env file using the credentials from github. * Run ``make run``. * Open http://localhost:8000 * Hack. +**NEVER** commit your .env file! Run local commands ------------------ diff --git a/localrequirements.txt b/localrequirements.txt new file mode 100644 index 0000000..6910097 --- /dev/null +++ b/localrequirements.txt @@ -0,0 +1,14 @@ +Django==1.4.1 +South==0.7.6 +argparse==1.2.1 +dj-database-url==0.2.1 +django-heroku-memcacheify==0.3 +django-social-auth==0.7.4 +httplib2==0.7.4 +oauth2==1.5.211 +psycopg2==2.4.5 +python-openid==2.2.5 +raven==2.0.3 +requests==0.13.6 +simplejson==2.4.0 +wsgiref==0.1.2 diff --git a/requirements.txt b/requirements.txt index 0e1bb85..e8d0ae5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,17 +1,4 @@ -Django==1.4.1 -South==0.7.6 -argparse==1.2.1 -dj-database-url==0.2.1 -django-heroku-memcacheify==0.3 django-pylibmc-sasl==0.2.4 -django-social-auth==0.7.4 gunicorn==0.14.6 -httplib2==0.7.4 -oauth2==1.5.211 -psycopg2==2.4.5 pylibmc==1.2.3 -python-openid==2.2.5 -raven==2.0.3 -requests==0.13.6 -simplejson==2.4.0 -wsgiref==0.1.2 +-r localrequirements.txt diff --git a/settings.py b/settings.py index 73cd402..6c7a5b6 100644 --- a/settings.py +++ b/settings.py @@ -13,6 +13,9 @@ LANGUAGE_CODE = 'en' SITE_ID = 1 +assert 'SECRET_KEY' in os.environ, 'Set SECRET_KEY in your .env file!' +SECRET_KEY = os.environ['SECRET_KEY'] + USE_L10N = USE_I18N = False MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')