your reply gave me another idea: rename the class which I have now as Author to Person and create subclass Author using OneToOne relation, where I'll keep not only place, but also affiliation like this:
from django.db import models class Person(models.Model): name = models.CharField(maxlength=50) class Author(models.Model): person = models.ForeignKey(Person, unique=True) place = models.PositiveSmallIntegerField() affiliation = models.CharField(maxlength=50) reference=models.ForeignKey(Reference) class Reference(models.Model): title = models.CharField(maxlength=50, primary_key=True) authors = models.ManyToManyField(Author) It looks more naturally now, person can be an author of paper after all :-) thank you for idea! probably I'll use it in couple more places Maxim Loginov http://zeliboba.by.ru/ On Sep 28, 2:26 pm, Toby Dylan Hocking <[EMAIL PROTECTED]> wrote: > > What you want to do is the following. Instead of using a ManyToManyField, > create an intermediate table: > > class AuthorLoc(models.Model): > author=models.ForeignKey(Author) > position=models.IntegerField() > reference=models.ForeignKey(Reference,edit_inline=True) > > class Meta: > ordering=(('position')) > > Then when you want to search authors or references you can ... > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---