title: error 405 web.py
body: <p>I got an error 405 as you can read, here is my code and my guess of what's wrong. The code is pretty basic, they are 3 files, main.py, blog.py, and form.html. As additional info: this code uses sessions, a subapp, and templates.</p>
  
  <p>main.py --</p>
  
  <pre><code>import web
  import blog
  
  urls = (
    "/blog", blog.app_blog,
    "/(.*)", "index"
  )
  
  web.config.debug = False
  app = web.application(urls, locals())
  session = web.session.Session(app, web.session.DiskStore('sessions'))    
  render = web.template.render('views/', globals = {'session': session})
  
  class index:
  
      def GET(self, path):
          session.names = ''
          session.surnames = ''
          session.nin = ''
          session.address = ''
          session.phone = ''
          session.email = ''
          return render.form()
  
  
  if __name__ == "__main__":
      app.run()
  </code></pre>
  
  <p>--</p>
  
  <p>blog.py --</p>
  
  <pre><code>import web
  urls = (
    "", "reblog",
    "/", "blog"
  )
  
  class reblog:
      def GET(self): raise web.seeother('/')
  
  class blog:
      def GET(self):
          return "getblog"
      def POST(self):
          return "postblog"
  
  app_blog = web.application(urls, locals())
  </code></pre>
  
  <p>-- form.html--</p>
  
  <pre><code>&lt;form method=post action=blog&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;input name=names required maxlength=24 placeholder="Name" value="$session.names"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;input name=surnames required maxlength=24 placeholder="Surname" value="$session.surnames"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;input name=nin requiered maxlength=12 placeholder="RUT" value="$session.nin"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;input name=address required maxlenght=64 placeholder="Address" value="$session.address"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;input name=phone required maxlength=10 placeholder="Phone" value=$session.phone&gt;&lt;/li&gt;
          &lt;li&gt;&lt;input name=email type=email required maxlenght=254 placeholder="email" value=$session.email&gt;&lt;/li&gt;
          &lt;li&gt;&lt;input name=password type=password required placeholder="password"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;input name=confirmpassword type=password required placeholder="Confirmar pass"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;input type=submit value="registrarse"&gt;&lt;/li&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <h2>    </h2>
  
  <p>The thing is that the user inputs are not use by the POST, rather it gives me an error 405 exactly like this:
  "HTTP/1.1 POST /blog" - 405 Method Not Allowed</p>
  
  <p>and the browser prints None.</p>
  
  <p>Please give me a hand guys, this is pretty frustrating, if you know what I mean.</p>
  
  <p>Thanks beforehand.</p>
  
  <p>Cheers.</p>