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?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to