return super(UndeletedObjectManager, self).get_query_set().exclude(used_count=0)
-class Tag(DeletableContent):
+class Tag(BaseModel, DeletableContent):
name = models.CharField(max_length=255, unique=True)
created_by = models.ForeignKey(User, related_name='created_tags')
marked_by = models.ManyToManyField(User, related_name="marked_tags", through="MarkedTag")
# Denormalised data
used_count = models.PositiveIntegerField(default=0)
- objects = models.Manager()
active = ActiveTagManager()
class Meta(DeletableContent.Meta):
- db_table = u'tag'
ordering = ('-used_count', 'name')
def __unicode__(self):