Re: restricting choices of foreign key to objects owned by user

2012-01-13 Thread Kevin
You will need to alter the methods for the AdminModel: https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.queryset Your main focus will be the queryset method to limit what users can see, this should also limit drop down boxes as well. You may also want to l

restricting choices of foreign key to objects owned by user

2012-01-12 Thread kenneth gonsalves
hi note: this is in admin. I have a model called Child. Child has foreign key to Project. There are many projects, but each user is only allowed to add a child to the projects he belongs to. I have restricted the ProjectAdmin queryset so that the user can only see his projects in the project chang