Would a valid request URL ever have a '.html' extension in web2py?
<p>The <a href="http://web2py.com/books/default/chapter/29/04/the-core" rel="nofollow">web2py book's "Core" chapter</a> says:</p>

<blockquote>
  <p>web2py maps GET/POST requests of the form:</p>
</blockquote>

<pre><code>http://127.0.0.1:8000/a/c/f.html/x/y/z?p=1&amp;q=2
</code></pre>

<blockquote>
  <p>to function f in controller "c.py" in application a, </p>
</blockquote>

<p>However I would imagine that the truly valid URL would not have <code>.html</code> in it. In fact, further down on the same page we read:</p>

<blockquote>
  <p>URLs are only allowed to contain alphanumeric characters, underscores, and slashes; the args may contain non-consecutive dots. Spaces are replaced by underscores before validation.</p>
</blockquote>

<p>And it is clear that <code>.html</code> is not part of <code>args</code> yet it has a dot in it. Therefore the example URL contradicts the valid URL as documented further down the page.</p>

<p>The part after the dot is used by web2py to render the proper view. Both <code>a/c/f.html</code> and <code>a/c/f.json</code> calls the same function (<code>f</code> inside the  <code>c.py</code> controller), but the former will render <code>views/c/f.html</code> while the later <code>views/c/f.json</code> (if present, otherwise it will render <code>views/generic.json</code> in localhost or raise 404 in production).</p>

<p>Note that the extension can be omitted, and the default will be <code>.html</code>. Also, you can set <code>response.view</code> inside your controller to change the default behavior.</p>

<p>So yes, a valid URL might have an extension.</p>

<p>Hope it helps!</p>

python validation web2py