How do I represent many to many relation in the form of Google App Engine?
Posted
by Jacky
on Stack Overflow
See other posts from Stack Overflow
or by Jacky
Published on 2009-05-13T06:58:45Z
Indexed on
2010/03/17
7:01 UTC
Read the original article
Hit count: 269
python
|google-app-engine
class Entry(db.Model):
...
class Tag(db.Model):
...
class EntryTag(db.Model):
entry = db.ReferenceProperty(Entry, required=True, collection_name='tag_set')
tag = db.ReferenceProperty(Tag, required=True, collection_name='entry_set')
The template should be {{form.as_table}}
The question is how to make a form to create Entry where I can choose to add some of the tags ?
© Stack Overflow or respective owner