1 from django.db import models
2 from django.utils.translation import gettext_lazy as _
5 class Author(models.Model):
6 name = models.CharField(max_length=255)
7 year_of_death = models.SmallIntegerField(null=True, blank=True)
8 status = models.PositiveSmallIntegerField(null=True, blank=True, choices=[
19 class Book(models.Model):
20 uri = models.CharField(max_length=255)
22 authors = models.ManyToManyField(Author, blank=True)
23 translators = models.ManyToManyField(Author, related_name='translated_book_set', related_query_name='translated_book', blank=True)
24 title = models.CharField(max_length=255)
25 language = models.CharField(max_length=3)
26 based_on = models.ForeignKey('self', models.PROTECT, related_name='translation', null=True, blank=True)
28 scans_source = models.CharField(max_length=255, blank=True)
29 text_source = models.CharField(max_length=255, blank=True)
30 notes = models.TextField(blank=True)
31 priority = models.PositiveSmallIntegerField(default=0, choices=[