X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/3033e6b9f88d1729c3adc32ae8e45c6c4cffe4e0..7f108d550f1cfaa3bd8422a038e5f0f7ce28c988:/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")