Created
February 8, 2013 02:23
-
-
Save mekarpeles/4736133 to your computer and use it in GitHub Desktop.
The new and improved waltz v.0.1.64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo pip install --upgrade waltz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import waltz | |
from waltz import User, session, render | |
urls = ('/', 'Index') | |
sessions = {'logged': False, 'uid': None} | |
app = waltz.setup.dancefloor(urls, globals(), sessions=sessions) | |
class Index: | |
"""Introducing Waltz 0.1.64 Spotlight -- The 'User' module""" | |
def GET(self): | |
"""Creates a user within lazydb and returns the user dict to | |
the client """ | |
# creates user and saves in LazyDB | |
User.register('username', '******') | |
# retrieves the user from LazyDB by pkey | |
return User.get('username') | |
if __name__ == "__main__": | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment