tagged = managers.ModelTaggedItemManager(Tag)
tags = managers.TagDescriptor(Tag)
tag_relations = GenericRelation(Tag.intermediary_table_model)
- translators = models.ManyToManyField(Tag)
+ translators = models.ManyToManyField(Tag, blank=True)
html_built = django.dispatch.Signal()
published = django.dispatch.Signal()
has_daisy_file.boolean = True
def has_sync_file(self):
- return self.has_media("sync")
+ return settings.FEATURE_SYNCHRO and self.has_media("sync")
def get_sync(self):
with self.get_media('sync').first().file.open('r') as f:
meta_tags = Tag.tags_from_info(book_info)
- for tag, relationship in meta_tags:
- if not tag.for_books:
- tag.for_books = True
- tag.save()
-
just_tags = [t for (t, rel) in meta_tags if not rel]
book.tags = set(just_tags + book_shelves)
book.save() # update sort_key_author