Browse files

- renamed TermRelationship to TermTaxonomyRelationship

  • Loading branch information...
1 parent 6667aa8 commit 65f847d050d5642bef004ad1aa2be929abd79844 @twig committed Mar 11, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 wordpress/models.py
View
6 wordpress/models.py
@@ -209,14 +209,14 @@ def term(self, terms, taxonomy='post_tag'):
try:
tx = Taxonomy.objects.filter(name = taxonomy, term__name__in = terms)
- post_ids = TermRelationship.objects.filter(term_taxonomy__in = tx).values_list('object_id', flat = True)
+ post_ids = TermTaxonomyRelationship.objects.filter(term_taxonomy__in = tx).values_list('object_id', flat = True)
return Post.objects.published().filter(pk__in = post_ids)
except Taxonomy.DoesNotExist:
return Post.objects.none()
-class TermRelationship(WordPressModel):
+class TermTaxonomyRelationship(WordPressModel):
class Meta:
db_table = '%s_term_relationships' % TABLE_PREFIX
ordering = [ 'order', ]
@@ -312,7 +312,7 @@ def tags(self):
return self.tag_cache
def _get_terms(self, taxonomy):
- tr_pks = TermRelationship.objects.filter(object_id = self.id).values_list('term_taxonomy__pk', flat = True)
+ tr_pks = TermTaxonomyRelationship.objects.filter(object_id = self.id).values_list('term_taxonomy__pk', flat = True)
return Term.objects.filter(taxonomies__name = taxonomy, taxonomies__pk__in = tr_pks)
class PostMeta(WordPressModel):

0 comments on commit 65f847d

Please sign in to comment.