On Thu, Feb 21, 2008 at 9:35 AM, glopglop <[EMAIL PROTECTED]> wrote:
>  Not trying to be slow-witted, but couldn't you do
>
>  objects = MyModel.unfiltered() if request.user.is_admin else
>  MyModel.filtered()
>  (where objects is a queryset)
>
>  is there a functionnal difference or is it more of a style (which can
>  have its importance) ?

This only works in Python 2.5. The other works in every version of
Python Django supports.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to