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 <[email protected]>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 <[email protected]>wrote:
>
>> Good point!
>>
>> Thanks!
>>
>>
>>
>>
>> On Sat, May 28, 2011 at 9:46 PM, pbreit <[email protected]> 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).:_______
>