Although for the reasons you give below, one might have more success
getting standard base models into pinax than django core.
Plus helping Drupal users migrate to Django is a co-BDFL-endorsed goal
of Pinax ;)
Eric,
In the past (before model inheritance/queryset refactor) you could use
the user foreign key to get the various objects related to user X. So
you would have:
class Novel(models.Model):
author = ForeignKey(User)
published = DateTimeField()
class Magazine(models.Model):
author = ForeignKey(User)
credits = TextField()
then to get the querysets into one list for your template you might do
something like:
u = User.objects.get(username='bill')
qs1 = Novel.objects.filter(author=u)
qs2 = Magazine.objects.filter(author=u)
mylist = list(qs1) + list(qs2)
Then you can pass mylist to your template and render it. This doesn't
do the cool stuff with model inheritance but it usually works.
I'd imagine if you write a patch and submit to either Pinax or the
appropriate django project, you will likely get positive feedback.
Base models makes a lot of sense but only recently (month or two ago)
has model inheritance hit trunk, and is yet to be in an official
release (any day now).
--
Milan
Eric,
Just to clarify, actually qs-refactor hit trunk April 26 ... so it's
been more than a month or two! Time flies.
http://code.djangoproject.com/wiki/QuerysetRefactorBranch
--
Milan