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=generate_register_form())
def user():
if 'register' in request.args:
redirect(URL('register'))
if 'profile' in request.args:
redirect(URL('profile'))
return dict(form=auth())
All this works fine and does what I expect it to do (in development it
works just because it uses the generic view) but I would like the
custom profile() and register() functions to use the views/default/
user.html view (I need the exact same look/feel/behavior) and not
views/default/profile.html or views/default/register.html
respectively. So can I do this without copying views/default/user.html
over twice?
Thanks for your help!