Right, thanks. But what about the "next" attribute? What might be the 
reason of the arument not working?

On Friday, June 7, 2013 12:53:35 AM UTC+2, Anthony wrote:
>
> auth.register() automatically processes the form, so you should not 
> subsequently call request_form.process().
>
> Anthony
>
> On Thursday, June 6, 2013 6:21:52 PM UTC-4, lesssugar wrote:
>>
>> After user registers, I would like to redirect them to a different URL, 
>> let's say default/index.
>>
>> Auto-login in db.py is set to False.
>>
>> In my default.py controller I have this:
>>
>> register_form = auth.register(next=URL('default', 'index'))
>> register_form.update(_class='formstyle', _name='s_registration')
>> if register_form.process().accepts(request.vars, 
>> formname='s_registration'):
>>     auth.add_membership(group_id=1, 
>> user_id=register_form.vars.id<http://register_form_s.vars.id>
>> )
>>     
>> return dict(register_form=register_form)
>>
>> So after user registers, no redirection takes place. However, the 
>> registration itself is correct (checked auth_user and auth_membership in 
>> the DB).
>>
>> Any suggestions why "next" argument does't get the job done?
>>
>> UPDATE:
>> If I add "redirect(URL('default', 'index'))" in the IF condition (code 
>> above) - all goes fine. What's with the "next" argument then?
>>
>>

-- 

--- 
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