Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't publish your SECRET_KEY, folks.

  • Loading branch information...
commit 2702cc50c8c506352e4356eaefb8f219a5576701 1 parent c4d7a81
@jacobian jacobian authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  fabfile.py
  2. +2 −2 settings.py
  3. +1 −1  views.py
View
2  fabfile.py
@@ -9,7 +9,7 @@
def deploy():
deploy_code()
- run('restart django.me')
+ run('kill -HUP `cat /var/run/djangome.pid`')
def deploy_code():
project.rsync_project(env.deployroot.parent, delete=True, exclude=['*.pyc'])
View
4 settings.py
@@ -15,7 +15,7 @@
MIDDLEWARE_CLASSES = []
SITE_ID = 1
-SECRET_KEY = 'b2@r_iu-3@#dm6+b2nt-iyu0n6#1j&!zt2a+3hw%9!_1k9!(2b'
+SECRET_KEY = open('/home/web/sekrit.txt').read().strip()
ROOT_URLCONF = 'djangome.urls'
INSTALLED_APPS = ['djangome', 'gunicorn']
@@ -43,4 +43,4 @@
'propagate': True,
},
}
-}
+}
View
2  views.py
@@ -67,7 +67,7 @@ def show_term(request, term):
return render('show.html', {
'term': term,
'urls': get_urls(term),
- 'can_edit': True,
+ 'can_edit': request.COOKIES.get('sekrit') == settings.SECRET_KEY,
})
def get_urls(term):
Please sign in to comment.
Something went wrong with that request. Please try again.