2008/9/28 Alessandro Ronchi <[EMAIL PROTECTED]>:
> 2008/9/26 Orne <[EMAIL PROTECTED]>:
>>
>> This example doesn't work for me:
>> Error: 'super' object has no attribute 'filter'

 I use this code (it works with django 1.0):
    def queryset(self, request):
       # Limit the queryset to some subset based on the value of user.
       qs = super(SchedaOptions,self).queryset(request)
       utente = request.user
       if utente.is_superuser:
           return qs
       else:
           return qs.filter(referente=utente).filter(stato_scheda__exact = '0')


 I think the error of the example above was the lack of
 .queryset(request) call on super()



-- 
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net

SOASI Soc.Coop. - www.soasi.com
Sviluppo Software e Sistemi Open Source
Sede: Via Poggiali 2/bis, 47100 Forlì (FC)
Tel.: +39 0543 798985 - Fax: +39 0543 579928

Rispetta l'ambiente: se non ti è necessario, non stampare questa mail

--~--~---------~--~----~------------~-------~--~----~
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