Skip to content

Commit

Permalink
added serving of words.json
Browse files Browse the repository at this point in the history
  • Loading branch information
vhew committed Oct 14, 2012
1 parent 2c21fb2 commit 9f9fa30
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions vocably.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ def home():
output = template('home')
return output

@route('/words')
def words():
@route('/words.json')
def wordsdict():
# Get words for user
# word_defs = get_word_defs()
user_email = oauth.user_email()
newwords = score.choose_words(user_email)
word_defs = {w:definition.definition(w) for w in newwords}
output = template('words', word_defs=word_defs)
#word_defs = {"word1":"def1", "word2":"def2", "word3":"def3"}
return word_defs

@route('/words')
def words():
output = template('words', word_defs=wordsdict())
return output

@route('/login')
Expand Down

0 comments on commit 9f9fa30

Please sign in to comment.