Thanks!

On Sat, May 28, 2011 at 11:41 PM, Bruno Rocha <rochacbr...@gmail.com> wrote:

> def user():
>     if request.args(0)=='profile':
>         db.auth_user.username.readable = db.auth_user.username.writable =
> False
>
>     return dict(form=auth())
>
>
> --
> Bruno Rocha
> [ About me: http://zerp.ly/rochacbruno ]
>
>
>
> On Sat, May 28, 2011 at 11:28 PM, Bruno Rocha <rochacbr...@gmail.com>wrote:
>
>> You have to do that in the controller, not in view.
>>
>> {{=form}} is already builded in the controller, so if you define
>> 'readable' in view it will not effect the already created object.
>>
>> Go to controllers/deafult.py and in 'def user()' include the piece of
>> code.
>> --
>> Bruno Rocha
>> [ About me: http://zerp.ly/rochacbruno ]
>>
>>
>>
>> On Sat, May 28, 2011 at 11:12 PM, Tito Garrido <titogarr...@gmail.com>wrote:
>>
>>> I've tried:
>>>
>>> {{extend 'layout.html'}}
>>> <div align='center' width='100%'>
>>> <h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
>>> <div id="web2py_user_form">
>>> {{if request.args(0)=='profile':}}
>>> {{db.auth_user.username.readable = False}}
>>> {{db.auth_user.username.writable = False}}
>>> {{pass}}
>>> {{=form}}
>>>
>>> Didn't work... what am I doing wrong here?
>>>
>>>
>>> On Sat, May 28, 2011 at 11:09 PM, Tito Garrido <titogarr...@gmail.com>wrote:
>>>
>>>> Good point!
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, May 28, 2011 at 9:46 PM, pbreit <pbreitenb...@gmail.com> wrote:
>>>>
>>>>> You can set it in the controller. Something like if
>>>>> request.args(0)=='profile': in the user() function
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Linux User #387870
>>>> .........____
>>>> .... _/_õ|__|
>>>> ..º[ .-.___.-._| . . . .
>>>> .__( o)__( o).:_______
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Linux User #387870
>>> .........____
>>> .... _/_õ|__|
>>> ..º[ .-.___.-._| . . . .
>>> .__( o)__( o).:_______
>>>
>>
>>
>


-- 

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

Reply via email to