I have a view which contains a form that's within a LOAD component. The basic code for the component is something like this:
def function1():
try:
...
form = SQLFORM(db.my_table, row.id)
...
if form.process().accepted:
...
redirect(URL('controller1', 'function2'), client_side = True)
except Exception as e:
if isinstance(e, HTTP):
raise e
If using the code above, after the form is processed, it will redirect to ".../[my app's name]/controller1/
function2.load". If the URL() portion of the above code is changed to
URL('controller1', 'function2.html'),
the redirect seemingly behaves more or less as expected (i.e. loads the desired html view, 'function2', normally, albeit with '.html' at the end of the url). Why is it necessary to append ".html" to the function name to prevent a redirect to a non-existent LOAD component?