Hi,
I have a News model with a field in it called Topic:
topic = model.ManyToManyField(Topic)

Now I would like to add a Sequence field to the intermediary table and
as it has been suggested, I should delete the ManyToMany field from the
News model and create the intermediery table by hand.

class NewsToTopic(models.Model):
      news = models.ForeignKey(News)
      topic = models.ForeignKey(Topic)
      sequence = models.IntegerField()

1. How do I go about of getting a list of available topics on the Add
News admin page?
 (something like topics = news.topic.all())

2. Do I need to overwrite the save() method of the News model in order
to put a sequenceID in the intermediery table when I am adding a new
article?

Please tell me if I am heading in a right direction.
Thank you.
Ivan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to