Page 18 and 19 of this PDF: http://www.vanpyz.org/Djangojam/django_vancouver.pdf

give examples of some of the new hooks available in newforms-admin.
This is the only documentation I can find anywhere for this at the
moment.

The examples involve declaring a class called Admin. I think I might
be missing something obvious. Where does one do this and is there
anything else that I need to do? I've tried the following in models.py
to no avail:

class Admin:
    def change_list_queryset(self, request):
        userOrg = Organisation.objects.filter(contact=request.user.id)
        if (request.user.id==1):
            return Job.objects.all()
        else:
            return Job.objects.filter(organisation=userOrg)

The simplified version also doesn't work:

class Admin:
    def change_list_queryset(self, request):
        return Job.objects.filter(organisation=1)

so maybe the problem is sticking it in models.py?


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