X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/3033e6b9f88d1729c3adc32ae8e45c6c4cffe4e0..c66b8465f48325fe5fdc0fcf600f97dcc7bb7a26:/questions/models.py?ds=sidebyside diff --git a/questions/models.py b/questions/models.py index 33d2a43..746ad84 100644 --- a/questions/models.py +++ b/questions/models.py @@ -18,7 +18,7 @@ class TagCategory(models.Model): class Meta: verbose_name = _("Tag Category") - verbose_name_plural = _("Tag Categries") + verbose_name_plural = _("Tag Categories") def __unicode__(self): return self.name @@ -31,8 +31,9 @@ class Tag(TagBase): slug += "_%d" % i return slug - category = models.ForeignKey(TagCategory, blank = True, null = True, on_delete = models.SET_NULL) - + category = models.ForeignKey(TagCategory, blank = True, null = True, on_delete = models.SET_NULL, related_name = 'tags') + click_count = models.IntegerField(null = False, default = 0) + class Meta: verbose_name = _("Tag") verbose_name_plural = _("Tags")