Yes, they were both working but I have set form to auth() and elected to use 
LOAD() instead now but I have a similar problem. I am being redirected to 
default/index.load after I loggin. upon manually reloading this same page, I am 
redirected to default/user.load/profile. These pages have no formatting

#default.py
def index():
   return dict()

def handle_user():
   return dict(form=auth()) 
  
#default/index.html
    <div class="modal-body">
     
{{=LOAD('default','handle_user.load',args='login',ajax=True,target='uniqseven',extension=False)}}
   
    </div>

    <div class="modal-body">
     {{=LOAD('default','handle_user.load', args='register', 
ajax=True,target='uniqfive',extension=False)}} 
    </div>

#default/handle_user.load
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
<hr>
<div id="web2py_user_form">
  {{=form}}
  {{if request.args(0)=='login':}}
  {{if not 'register' in auth.settings.actions_disabled:}}
  <br/>
  <a href="{{=URL(args='register')}}">{{=T('Register')}}</a>
  {{pass}}
  {{if not 'request_reset_password' in auth.settings.actions_disabled:}}
  <br/>
  <a href="{{=URL(args='request_reset_password')}}">{{=T('Lost Password')}}</a>
  {{pass}}
  {{pass}}
</div>
<script language="javascript"><!--
      jQuery("#web2py_user_form input:visible:enabled:first").focus();
      //--></script>


On Tuesday, September 24, 2013 3:46:31 PM UTC-5, Massimo Di Pierro wrote:
>
> I have never tried this but I am not sure you can have those forms in the 
> same page. Apart for the incorrect redirect, do they both work?
>
> On Tuesday, 24 September 2013 13:09:51 UTC-5, raferbop wrote:
>>
>> def index():
>>    return dict(logform=auth.login(),regform=auth.register())
>>
>> I put these two forms from the Auth module on the index page, inside a 
>> modal but when I login/register I am redirected to a profile page instead 
>> of the index page. What can I do to prevent the redirect or go the index 
>> page?
>>
>

-- 
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/groups/opt_out.

Reply via email to