Personally I like 2 best, it seems more flexible in case you later decide to show different kinds of links or other information (like a note that says the profile is viewable only to friends, etc.)
On Wed, Apr 7, 2010 at 14:02, mtnpaul <mountainp...@gmail.com> wrote: > I have a logged in user. The user does a search for other uses on the > system. The other users can have various type(s) of privacy set for > their profiles. Privacy levels are Public, Friend, Community (think > Pinax Tribe), and Private. > > I want to display a list of the users, and depending on the users > relationship display a link to view the other persons profile (even > users with a Private profile are to be in the list) > > Possible solutions. > > 1. Pass to the template a list of profiles, the profile will now have > a new attribute called can_view_profile set according to the > relationship (this is not a field on the model) > > 2. Create a new tag that will take as input the two users and return a > link to the profile if appropriate. > > 3. Some better suggestion from you. > > > The problem with one is that everything for the template was > originally done for list of users that can be sorted , and changing it > to profiles is a bit of pain. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.