title: TypeError: __template__() in web.py python framework
body: <p>I am using python web.py framework to design a small web application following is my index.py code</p>
  
  <p><strong>index.py</strong></p>
  
  <pre><code>import web
  from web import form
  import MySQLdb as mdb
  
  
  
  render = web.template.render('templates/')
  
  urls = (
    '/',   'Login',
    '/projects',  'Projects',
  )
  
  app = web.application(urls, globals())
  conn = mdb.connect(user='root', passwd='redhat', db='Python_Web', host='localhost')
  
  class Login:
  
      login_form = form.Form( 
          form.Textbox('username', form.notnull),
          form.Password('password', form.notnull),
          form.Button('Login'),
      )
  
      def GET(self):
          form = self.login_form()
          return render.login(form)
  
      def POST(self):
          if not self.login_form.validates():
              return render.login(self.login_form)
          i = web.input()
          username = i.username
          password = i.password
          query = "select user_login,user_password from user where user_login = '%s' " % username
          cur = conn.cursor()
          cur.execute( query )
          user_details = cur.fetchone()
          if username == user_details[0] and password == user_details[1]:
              raise web.seeother('/projects')
          else:
              return render.login_error(form)    
  
  if __name__ == "__main__":
      web.internalerror = web.debugerror
      app.run()     
  </code></pre>
  
  <p>When i run the above file with <code>localhost:8080</code>  in browser i can able to see login page 
  which has the code in <code>login.html</code> and accessed as <code>render.login(form)</code>,</p>
  
  <p>but when user name and password matches my intention is to redirect to another page (<code>projects.py</code>) and written as <code>web.seeother('/projects')</code> above. Now this will go the projects class and display the html page from that class</p>
  
  <p>but When i click on login button i am seeing the following error</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/web/application.py", line 239, in process
      return self.handle()
    File "/usr/lib/python2.7/site-packages/web/application.py", line 230, in handle
      return self._delegate(fn, self.fvars, args)
    File "/usr/lib/python2.7/site-packages/web/application.py", line 420, in _delegate
      return handle_class(cls)
    File "/usr/lib/python2.7/site-packages/web/application.py", line 396, in handle_class
      return tocall(*args)
    File "/home/local/usser/python_webcode/index.py", line 55, in GET
      app.run()
    File "/usr/lib/python2.7/site-packages/web/template.py", line 881, in __call__
      return BaseTemplate.__call__(self, *a, **kw)
    File "/usr/lib/python2.7/site-packages/web/template.py", line 808, in __call__
      return self.t(*a, **kw)
  TypeError: __template__() takes exactly 1 argument (0 given)
  </code></pre>
  
  <p>Can anyone help me out on how to solve the above error</p>
  
  <p>Also in web.py how to redirect to another class which has link to html file    </p>