Commits

Francois Dion committed 638251f

pep8 and fo3 fix

Comments (0)

Files changed (2)

webpy/forms/fo2.py

 # Namespace injection
 web.template.Template.globals['render'] = render
 
+
 class Create:
 
     def GET(self):

webpy/forms/fo3.py

 #!/usr/bin/env python
 
 import time
-import web, web.webopenid
+import web
+
 
 class Redirect:
 
     def GET(self):
         web.seeother('/scan')
-        
+
+
 class ServerTime:
 
     def GET(self):
-        timeStr = time.strftime("%H:%M:%S") # obtains current time
+        timeStr = time.strftime("%H:%M:%S")  # obtains current time
         return timeStr
 
+
 class ScanMember:
 
     def __init__(self):
         self.my_form = web.form.Form(
-              web.form.Textbox('', class_='textfield', id='textfield'),
-              description="Scan your badge",
-                        )
+            web.form.Textbox('', class_='textfield', id='textfield'),
+            description="Scan your badge",
+        )
         self.render = web.template.render('templates/', base='base')
 
     def member_info(self, string):
 
     def GET(self):
         form = self.my_form()
-        return self.render.scan(form, 
-                "Member information will appear here.")
-        
+        return self.render.scan(
+            form,
+            "Member information will appear here."
+        )
+
     def POST(self):
         form = self.my_form()
         if not form.validates():
-            return self.render.scan(form,
-                    "Member information will appear here.")
+            return self.render.scan(
+                form,
+                "Member information will appear here."
+            )
         s = form.value['textfield']
-        return self.employee_info(s)
+        return self.member_info(s)
 
 URLS = ('/', Redirect,
         '/scan', ScanMember,