Permalink
Browse files

Merge pull request #67 from ytjohn/pycket-login-demo

pep-8 compliance
  • Loading branch information...
2 parents 8a13e28 + 36b7bd4 commit eebc1acdf0e98340f01edbb1ae00762aae761377 @fiorix committed Aug 30, 2012
Showing with 12 additions and 8 deletions.
  1. +12 −8 demos/pycket/pycketdemo.py
View
@@ -44,11 +44,11 @@ def __init__(self):
settings['pycket'] = {
'engine': 'redis',
'storage': {
- 'host' : 'localhost',
- 'port' : 6379,
- 'db_sessions' : 10,
- 'db_notifications' : 11,
- }
+ 'host': 'localhost',
+ 'port': 6379,
+ 'db_sessions': 10,
+ 'db_notifications': 11
+ }
}
cyclone.web.Application.__init__(self, handlers, **settings)
@@ -73,13 +73,17 @@ def get(self):
class AuthHandler(BaseHandler, SessionMixin):
def get(self):
- self.write('<form method="post">Enter your username: <input name="username" type="text"><button type="submit" class="btn">Login</button></form>')
-
+ self.write('<form method="post">'
+ 'Enter your username: <input name="username" type="text">'
+ '<button type="submit" class="btn">Login</button></form>')
def post(self):
username = self.get_argument('username')
if not username:
- self.write('<form method="post">Enter your username: <input name="username" type="text"><button type="submit" class="btn">Login</button></form>')
+ self.write('<form method="post">Enter your username: '
+ '<input name="username" type="text">'
+ '<button type="submit" class="btn">Login</button>'
+ '</form>')
else:
self.session.set('user', username)
self.redirect('/')

0 comments on commit eebc1ac

Please sign in to comment.