Hi: I have two models, publishing and entry, whose relationship is one to many (one entry can have many publishings). In the admin interface I have a ModelAdmin class (for Publishing) in which I specify the following: search_fields = ('entry__title',)
I should now be able to view a list of publishings that is filtered based its entry's title. Well, I get the following error: Exception Type: AssertionError at /admin/coltrane/publishing/ Exception Value: Cannot combine a unique query with a non-unique query. I understand what the exception means but I'm not sure why there is a combination of unique and non-unique queries or how to go about fixing this error. I searched the web and this list, but no luck. Any ideas? Full traceback below. Cheers, A. Traceback: File "/Library/Python/2.5/site-packages/django/core/handlers/base.py" in get_response 86. response = callback(request, *callback_args, **callback_kwargs) File "/Library/Python/2.5/site-packages/django/contrib/admin/sites.py" in root 158. return self.model_page(request, *url.split('/', 2)) File "/Library/Python/2.5/site-packages/django/views/decorators/ cache.py" in _wrapped_view_func 44. response = view_func(request, *args, **kwargs) File "/Library/Python/2.5/site-packages/django/contrib/admin/sites.py" in model_page 177. return admin_obj(request, rest_of_url) File "/Library/Python/2.5/site-packages/django/contrib/admin/ options.py" in __call__ 189. return self.changelist_view(request) File "/Library/Python/2.5/site-packages/django/contrib/admin/ options.py" in changelist_view 638. self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self) File "/Library/Python/2.5/site-packages/django/contrib/admin/views/ main.py" in __init__ 67. self.query_set = self.get_query_set() File "/Library/Python/2.5/site-packages/django/contrib/admin/views/ main.py" in get_query_set 229. qs = qs & other_qs File "/Library/Python/2.5/site-packages/django/db/models/query.py" in __and__ 241. combined.query.combine(other.query, sql.AND) File "/Library/Python/2.5/site-packages/django/db/models/sql/query.py" in combine 325. "Cannot combine a unique query with a non-unique query." Exception Type: AssertionError at /admin/coltrane/publishing/ Exception Value: Cannot combine a unique query with a non-unique query. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---