gazeta_link = models.CharField(blank=True, max_length=240)
wiki_link = models.CharField(blank=True, max_length=240)
+ created_at = models.DateTimeField(_('creation date'), auto_now_add=True, db_index=True)
+ changed_at = models.DateTimeField(_('creation date'), auto_now=True, db_index=True)
+
categories_rev = {
'autor': 'author',
'epoka': 'epoch',
title = models.CharField(_('title'), max_length=120)
slug = models.SlugField(_('slug'), max_length=120, unique=True, db_index=True)
description = models.TextField(_('description'), blank=True)
- created_at = models.DateTimeField(_('creation date'), auto_now_add=True)
+ created_at = models.DateTimeField(_('creation date'), auto_now_add=True, db_index=True)
+ changed_at = models.DateTimeField(_('creation date'), auto_now=True, db_index=True)
_short_html = models.TextField(_('short HTML'), editable=False)
parent_number = models.IntegerField(_('parent number'), default=0)
extra_info = JSONField(_('extra information'))
tag.save()
book_tags.append(tag)
- book.tags = book_tags + book_shelves
+ book.tags = set(book_tags + book_shelves)
book_tag = book.book_tag()