mekarpeles/waltz — pull request #6 by mekarpeles (2013-03-03 04:14:32+00:00)
Title: Feature/modules

Analytics logic can be referenced as a waltz.module rather than writing it within your main.py

## old

import waltz
urls = ('/analytics/?', 'Analytics')
app = waltz.setup.dancefloor(urls, globals())
class Analytics:
def GET(self):
web.header('Content-Type', 'application/json')
return waltz.db().get('analytics')

## new

import waltz
urls = ('/analytics/?', 'waltz.modules.Analytics')
app = waltz.setup.dancefloor(urls, globals())