Permalink
Browse files

Redirect to /setup-first if there are no circles (i.e. uninitialized db)

  • Loading branch information...
jonasb committed Oct 24, 2011
1 parent 3d656b7 commit d8cc6ce9ae003ca6335eff5bacd345efd5121af6
Showing with 4 additions and 1 deletion.
  1. +1 −1 README.md
  2. +3 −0 mugshots.py
View
@@ -23,7 +23,7 @@ Initialize the secret key
head -c 24 /dev/random | base64 > secret_key.txt
-Open the page `/setup-first` to populate the database.
+The database will be initialized when opening the index page the first time.
## Redis
View
@@ -56,6 +56,9 @@ def index():
mnemonic= mnemonic
)
circles.append(circle)
+ if len(circles) == 0:
+ return redirect(url_for('setup_first'))
+
people = db.smembers('nicks')
today = datetime.datetime.now().strftime('%Y-%m-%d')
members = []

0 comments on commit d8cc6ce

Please sign in to comment.