From 99b4c6b5dffa9f2bde604d4704124c759ac5df55 Mon Sep 17 00:00:00 2001 From: Jonas Obrist Date: Sat, 18 Aug 2012 02:47:33 +0200 Subject: [PATCH 1/2] added secret key --- README.md | 3 ++- settings.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 50e4858..3217960 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,12 @@ 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``. * Run ``make run``. * Open http://localhost:8000 * Hack. +**NEVER** commit your .env file! Run local commands ------------------ diff --git a/settings.py b/settings.py index 7032b42..8df0dd5 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') From a07c5baeb4d27882bf88a40f7b7f0a352a83d190 Mon Sep 17 00:00:00 2001 From: Jonas Obrist Date: Sat, 18 Aug 2012 03:03:17 +0200 Subject: [PATCH 2/2] local requirements without pylibmc --- Makefile | 2 +- localrequirements.txt | 14 ++++++++++++++ requirements.txt | 15 +-------------- 3 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 localrequirements.txt 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/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