Worked! :) thanks
On Sunday, 30 December 2012 19:59:28 UTC, Massimo Di Pierro wrote:
>
> How about
>
> #model
> auth.settings.extra_fields['auth_user'] = [Field('personal_info','text')]
>
> #controller
> def profile(): return dict(user=db.auth_user(request.args(0,cast=int)))
>
> #view profile.html
> {{extend
> 'layout.html'}}<h1>{{=user.first_name}}</h1><p>{{=user.personal_info}}</p>
>
> Mind that profile() should only be exposed in HTML (not JSON, XML, etc)
> unless you filer the fields, else it may expose personal info.
>
> On Sunday, 30 December 2012 11:46:57 UTC-6, sasogeek wrote:
>>
>> can i create a new view so that i can have something like
>> http://...[app]/[controller]/[view]/profile/[user_id] and based on the user
>> id, the view displays a particular profile? like the show controller/view
>> in the example images app in the documentation...? and even if so, can i
>> have some code guidance cos i'm not too good with the auth system and
>> web2py in general...
>>
>> On Sunday, 30 December 2012 17:30:45 UTC, sasogeek wrote:
>>>
>>> well in my application, i allow users to register and login using the
>>> auth, but auth only exposes http://...[app]/[controller]/[view]/profile
>>> which is the profile of the currently logged in user. i want to create a
>>> link so that other users can click on it to see other people's profiles.
>>>
>>> On Sunday, 30 December 2012 00:40:44 UTC, viniciusban wrote:
>>>>
>>>> What do you mean with "user profiles"?
>>>>
>>>>
>>>> On Sat, Dec 29, 2012 at 8:51 AM, sasogeek <[email protected]> wrote:
>>>> > How do allow users to see their profiles and that of other users...?
>>>> >
>>>> > --
>>>> >
>>>> >
>>>> >
>>>>
>>>
--