Many thanks Don.  I figured it out, but because of issues with google 
have had problems posting back.

It turns out that I don't even have to use get_profile.  Something like 
{{ user.userprofile.postcode }} works fine, where userprofile is the 
name of the one-to-one class.

MerMer


> On Oct 26, 2006, at 6:12 AM, MerMer wrote:
>   
>> 1)  I am able to add fields from the User class directly to a  
>> template.
>> e.g. {{ user.email }}. However, I can't see a way to add the extra
>> fields from the UserProfile class directly to the template, even  
>> though
>> it has a one-to-one relationship with User.  Have I missed something
>> here?
>>     
>
>
>
> Did you set the AUTH_PROFILE_MODULE setting? Once set, your User  
> object uses the get_profile() method to access the extra fields. In  
> your template you access those profile values like this:
>
> {{ user.get_profile.extra_field }}
>
> Don
>
>
>
> >
>
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to