hello, everyone
now, in the scene:
there are some tables in my database,
table novels:
id (primary key),
name
table authors:
id (primary key),
name
table author_novels:
id (primary key),
novel_id ( references novels(id) )
author_id ( references authors(id) )
the tables and the columns can't be changed for some reason.
and, i built models like this:
class Novel(models.Model):
name = CharField()
class Author(models.Model):
name = CharField()
novels = models.ManyToManyField(Novel, db_table='author_novels')
how could i map the columns novel_id and author_id from the table author_novels
?
lijihuai,[email protected]
2009-10-29
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---