X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/85b57aa2d25552d82260ce40fd9b1063dd7c3dd5..062c5ec3437a944e39b486d36a54a6a11fa332d1:/apps/catalogue/models.py diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 7bddbbd01..d8565c4bc 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): @@ -77,9 +78,10 @@ class Book(models.Model): # Formats xml_file = models.FileField(_('XML file'), upload_to='books/xml', blank=True) + html_file = models.FileField(_('HTML file'), upload_to='books/html', blank=True) pdf_file = models.FileField(_('PDF file'), upload_to='books/pdf', blank=True) odt_file = models.FileField(_('ODT file'), upload_to='books/odt', blank=True) - html_file = models.FileField(_('HTML file'), upload_to='books/html', blank=True) + txt_file = models.FileField(_('TXT file'), upload_to='books/txt', blank=True) parent = models.ForeignKey('self', blank=True, null=True, related_name='children')