Hello.

For a small webshop I have the following models: Product, Category,
Country and UserProfile. Each user have a country set with a FK, and
should only be allowed to see content in the administration assigned
to the same Country. The Product and Category have FKs to the Country
model so I can ensure this by writing a "formfield_for_foreignkey" on
the ModelAdmin. So far so good, as I can also filter the admin list
view by overwriting the queryset() model on the ModelAdmin.

The problem now is that I can assign several categories to each
Product. But I only want to allow people to see the Categories for the
same Country as the product. How is that possible. Apparently the
options for the m2m field is not filtered by the queryset and I can't
see there is a formfield_for_manytomanyfield?
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to