"status",
"gender",
"nationality",
+ ("genitive", admin.EmptyFieldListFilter)
]
list_per_page = 10000000
search_fields = ["first_name", "last_name", "wikidata"]
class CategoryAdmin(admin.ModelAdmin):
search_fields = ["name"]
-admin.site.register(models.Epoch, CategoryAdmin)
-admin.site.register(models.Genre, CategoryAdmin)
-admin.site.register(models.Kind, CategoryAdmin)
+
+@admin.register(models.Epoch)
+class EpochAdmin(CategoryAdmin):
+ list_display = ['name', 'adjective_feminine_singular', 'adjective_nonmasculine_plural']
+
+
+@admin.register(models.Genre)
+class GenreAdmin(CategoryAdmin):
+ list_display = ['name', 'plural', 'is_epoch_specific']
+
+
+@admin.register(models.Kind)
+class KindAdmin(CategoryAdmin):
+ list_display = ['name', 'collective_noun']
--- /dev/null
+# Generated by Django 4.0.6 on 2022-11-29 12:08
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('catalogue', '0040_collection_description'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='author',
+ name='genitive',
+ field=models.CharField(blank=True, help_text='utwory … (czyje?)', max_length=255, verbose_name='dopełniacz'),
+ ),
+ migrations.AddField(
+ model_name='epoch',
+ name='adjective_feminine_singular',
+ field=models.CharField(blank=True, help_text='twórczość … Adama Mickiewicza', max_length=255, verbose_name='przymiotnik pojedynczy żeński'),
+ ),
+ migrations.AddField(
+ model_name='epoch',
+ name='adjective_nonmasculine_plural',
+ field=models.CharField(blank=True, help_text='utwory … Adama Mickiewicza', max_length=255, verbose_name='przymiotnik mnogi niemęskoosobowy'),
+ ),
+ migrations.AddField(
+ model_name='genre',
+ name='is_epoch_specific',
+ field=models.BooleanField(default=False, help_text='Po wskazaniu tego gatunku, dodanie epoki byłoby nadmiarowe, np. „dramat romantyczny”'),
+ ),
+ migrations.AddField(
+ model_name='genre',
+ name='plural',
+ field=models.CharField(blank=True, help_text='dotyczy gatunków', max_length=255, verbose_name='liczba mnoga'),
+ ),
+ migrations.AddField(
+ model_name='kind',
+ name='collective_noun',
+ field=models.CharField(blank=True, help_text='np. „Liryka” albo „Twórczość dramatyczna”', max_length=255, verbose_name='określenie zbiorowe'),
+ ),
+ migrations.AlterField(
+ model_name='author',
+ name='description',
+ field=models.TextField(blank=True, help_text='for publication', verbose_name='description'),
+ ),
+ migrations.AlterField(
+ model_name='author',
+ name='description_de',
+ field=models.TextField(blank=True, help_text='for publication', null=True, verbose_name='description'),
+ ),
+ migrations.AlterField(
+ model_name='author',
+ name='description_lt',
+ field=models.TextField(blank=True, help_text='for publication', null=True, verbose_name='description'),
+ ),
+ migrations.AlterField(
+ model_name='author',
+ name='description_pl',
+ field=models.TextField(blank=True, help_text='for publication', null=True, verbose_name='description'),
+ ),
+ migrations.AlterField(
+ model_name='author',
+ name='notes',
+ field=models.TextField(blank=True, help_text='private', verbose_name='notes'),
+ ),
+ migrations.AlterField(
+ model_name='book',
+ name='notes',
+ field=models.TextField(blank=True, help_text='private', verbose_name='notes'),
+ ),
+ migrations.AlterField(
+ model_name='collection',
+ name='notes',
+ field=models.TextField(blank=True, help_text='private', verbose_name='notes'),
+ ),
+ migrations.AlterField(
+ model_name='collectioncategory',
+ name='notes',
+ field=models.TextField(blank=True, help_text='private', verbose_name='notes'),
+ ),
+ ]
slug = models.SlugField(max_length=255, null=True, blank=True, unique=True)
first_name = models.CharField(_("first name"), max_length=255, blank=True)
last_name = models.CharField(_("last name"), max_length=255, blank=True)
+ genitive = models.CharField(
+ 'dopełniacz', max_length=255, blank=True,
+ help_text='utwory … (czyje?)'
+ )
name_de = models.CharField(_("name (de)"), max_length=255, blank=True)
name_lt = models.CharField(_("name (lt)"), max_length=255, blank=True)
def __str__(self):
return self.name
+
class Epoch(Category):
+ adjective_feminine_singular = models.CharField(
+ 'przymiotnik pojedynczy żeński', max_length=255, blank=True,
+ help_text='twórczość … Adama Mickiewicza'
+ )
+ adjective_nonmasculine_plural = models.CharField(
+ 'przymiotnik mnogi niemęskoosobowy', max_length=255, blank=True,
+ help_text='utwory … Adama Mickiewicza'
+ )
+
class Meta:
verbose_name = _('epoch')
verbose_name_plural = _('epochs')
class Genre(Category):
+ plural = models.CharField(
+ 'liczba mnoga', max_length=255, blank=True,
+ help_text='dotyczy gatunków'
+ )
+ is_epoch_specific = models.BooleanField(
+ default=False,
+ help_text='Po wskazaniu tego gatunku, dodanie epoki byłoby nadmiarowe, np. „dramat romantyczny”'
+ )
+
class Meta:
verbose_name = _('genre')
verbose_name_plural = _('genres')
class Kind(Category):
+ collective_noun = models.CharField(
+ 'określenie zbiorowe', max_length=255, blank=True,
+ help_text='np. „Liryka” albo „Twórczość dramatyczna”'
+ )
+
class Meta:
verbose_name = _('kind')
verbose_name_plural = _('kinds')