Skip to content

Commit

Permalink
terms ManyToManyField
Browse files Browse the repository at this point in the history
  • Loading branch information
collinanderson committed Sep 8, 2014
1 parent 0be6ff5 commit 1d435c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wordpress/models.py
Expand Up @@ -247,7 +247,7 @@ def from_path(self, path):

class TermTaxonomyRelationship(WordPressModel):

object_id = models.IntegerField()
object = models.ForeignKey('Post')
term_taxonomy = models.ForeignKey('Taxonomy', related_name='relationships', db_column='term_taxonomy_id')
order = models.IntegerField(db_column='term_order')

Expand Down Expand Up @@ -299,6 +299,8 @@ class Post(WordPressModel):
menu_order = models.IntegerField(default=0)
mime_type = models.CharField(max_length=100, db_column='post_mime_type')

terms = models.ManyToManyField('Taxonomy', through='TermTaxonomyRelationship', blank=True)

term_cache = None
child_cache = None

Expand Down

0 comments on commit 1d435c3

Please sign in to comment.