ozknightwalker / django-basic-apps

Automatically exported from code.google.com/p/django-basic-apps
0 stars 0 forks source link

getprofile template tag for basic-profiles #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I added new templatetag for basic-profiles app called get_profile_for_user - it 
takes a user id and 
assigns user profile to given var. Pretty useful when adding profiles 
functionality to other pre-made 
apps.

Diff in attachment, please review if possible

Original issue reported on code.google.com by vvarpp on 20 May 2008 at 12:56

Attachments:

GoogleCodeExporter commented 8 years ago
The same can be achieved if you set AUTH_PROFILE_MODULE = 'profiles.profile' in 
your settings.py file. This will 
allow you to say user.get_profile(). James explains it best: 
http://www.b-list.org/weblog/2006/jun/06/django-
tips-extending-user-model/

Original comment by npbor...@gmail.com on 20 May 2008 at 1:12

GoogleCodeExporter commented 8 years ago
Nice one...
I completely missed that - thanks for clarification.

Original comment by vvarpp on 20 May 2008 at 1:21

GoogleCodeExporter commented 8 years ago

Original comment by npbor...@gmail.com on 20 May 2008 at 2:16