On 22/04/10 04:34, Lachlan Musicman wrote:
I presume this will make you all wince, but while appreciating the
discussion I've caused I've solved it thusly:
------------------------
views.py
def index(request):
all_authors = Author.objects.all()
all_origAuthors = []
all_translators = Translators.objects.all()
for author in all_authors:
if author in all_translators:
pass
else:
all_origAuthors.append(author)
return render_to_response('books/index.html',locals())
------------------------
Haven't really been following this thread, but taken in isolation:
Translator is a multi-table-inheritance subclass of Author, and
that means its primary key is a foreign key back to author's
primary key (at least in the way django presently implements things), so
e.g. the following is way to give authors who aren't translators:
Author.objects.exclude(pk__in=Translator.objects.all().values('pk'))
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@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.