Skip to content

Commit 0450441

Browse files
committedOct 13, 2012
Show word score
1 parent 7eb90e2 commit 0450441

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed
 

‎css/style.css

-5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@
5555
margin: 0;
5656
padding: 0;
5757
}
58-
59-
.monkey_business {
60-
margin-right: auto;
61-
margin-left: auto;
62-
}
6358

6459
}
6560
@media all and (min-width: 750px){

‎views/words.tpl

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
</div>
3434
%end
3535
</div>
36+
<h2>{{user_score}} words known</h2>
3637
</div>
3738
<script>
3839
//App custom javascript

‎vocably.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from bottle import route, run, debug, template, request, static_file, redirect
22
from utils import vocably_oauth as oauth, score, definition
3+
from utils import database as db
4+
35

46
# Landing Page
57
@route('/')
@@ -11,10 +13,13 @@ def home():
1113
def words():
1214
# Get words for user
1315
# word_defs = get_word_defs()
14-
# newwords = score.choose_words(oauth.user_email())
15-
newwords = ['grinder','helicopter','fab']
16+
user_email = oauth.user_email()
17+
newwords = score.choose_words(user_email)
18+
# newwords = ['grinder','helicopter','fab']
1619
word_defs = {w:definition.definition(w) for w in newwords}
17-
output = template('words', word_defs=word_defs)
20+
user_score = db.get_score(user_email)
21+
print 'user score:', user_score
22+
output = template('words', word_defs=word_defs, user_score=user_score)
1823
return output
1924

2025
@route('/login')

0 commit comments

Comments
 (0)
Please sign in to comment.