response.view might work better:
http://web2py.com/book/default/chapter/04?search=response.view
But what I do in my user.html view is branch on request.args(0):
{{if request.args(0)=='login':}}
...
{{elif request.args(0)=='register':}}
...
{{else:}}
{{=form}}
{{pass}}
take a look at
http://web2py.com/book/default/chapter/05#Using-the-Template-System-to-Generate-Emails
you can use this technique to reuse your views
I am curious about the general case of how a view file can be reused
but here is my specific example. I need custom user registration and
profile pages so my controller (default.py) looks like:
def profile():
return dict(form=generate_profile_form())
def register():
return dict(form=gener
3 matches
Mail list logo