I have the auth_user split up between employer and employee

After the profile is created I want to be able to modify the employee 
profile. 


So, I have this in my model 

auth.settings.profile_onaccept = lambda form: after_profile(form) 

In my controller:

def after_profile(form):
    if form.vars.user_type == 'employee':
        form = SQLFORM(db.employee,auth.user_id,deletable=True, 
submit_button='Update Profile').process()
        if form.accepted:
            session.flash = T('Proposal is modified')
            redirect(URL('default','index'))
    else:
        redirect(URL('default','index'))
    return dict(form = form)

request.args(0) is 'profile'. 

How to make the SQLFORM to make it editable for that profile/user_id? It 
doesn't work the way it is.

On Friday, February 5, 2016 at 11:58:23 AM UTC-5, Ron Chatterjee wrote:
>
> yes got it. Thank you. sorry. lol
>
> On Friday, February 5, 2016 at 11:19:29 AM UTC-5, Anthony wrote:
>>
>> In the shell, just print it, pass it to str(), or call its .xml() method.
>>
>> Or just load it in the browser and "view source".
>>
>> Anthony
>>
>> On Friday, February 5, 2016 at 10:44:58 AM UTC-5, Ron Chatterjee wrote:
>>>
>>> This may be trivial but how do I get the html code out of auth.navbar()? 
>>> It shows up as a gluon object.
>>>
>>> On Tuesday, February 2, 2016 at 6:29:19 PM UTC-5, Anthony wrote:
>>>>
>>>> I guess I can do this:
>>>>> https://groups.google.com/forum/#!topic/web2py/AYORqIEpc9E
>>>>> But that kills all the style. Then I got to custom style it. 
>>>>>
>>>>
>>>> Just look at the HTML generated by auth.navbar() and replicate that 
>>>> HTML, just making the changes you need in the links.
>>>>
>>>> Anthony
>>>>
>>>

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