X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0c889e3a716a781e8a875d8c6f54490fa6e570c9..2711c8990f3816ea86751cb761668bec93302ab8:/apps/catalogue/models.py?ds=inline diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index db911900b..db194347e 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -38,8 +38,9 @@ class Tag(TagBase): sort_key = models.SlugField(_('sort key'), max_length=120, db_index=True) category = models.CharField(_('category'), max_length=50, blank=False, null=False, db_index=True, choices=TAG_CATEGORIES) - description = models.TextField(blank=True) - + description = models.TextField(_('description'), blank=True) + main_page = models.BooleanField(_('main page'), default=False, db_index=True, help_text=_('Show tag on main page')) + user = models.ForeignKey(User, blank=True, null=True) def has_description(self): @@ -207,7 +208,7 @@ class Fragment(models.Model): text = models.TextField() short_text = models.TextField(editable=False) _short_html = models.TextField(editable=False) - anchor = models.IntegerField() + anchor = models.CharField(max_length=120) book = models.ForeignKey(Book, related_name='fragments') objects = models.Manager()