Skip to content

Commit

Permalink
Wire up gaesessions
Browse files Browse the repository at this point in the history
  • Loading branch information
georgevreilly committed Feb 2, 2013
1 parent 1e2aeca commit 5022b92
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions appengine_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from gae_flask_app import settings
from gaesessions import SessionMiddleware

def webapp_add_wsgi_middleware(app):
app = SessionMiddleware(app, cookie_key=settings.COOKIE_KEY)
return app
7 changes: 7 additions & 0 deletions gae_flask_app/settings.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
import os, binascii

def hex_random(num_bytes):
return binascii.b2a_hex(os.urandom(num_bytes))

DEBUG=True # True => Security Hole
VIDEO_JSON="test-videos.json"

COOKIE_KEY='0753e9465b8e5d2a0391dc3ef3f2e9a6ca14fc1bed63eae2c2101af80412de19c82553d532839495cc2b9e5db512d543dfb12cdbf9530c68fe9c57ced074c97a'

0 comments on commit 5022b92

Please sign in to comment.