feat: add choice with all

This commit is contained in:
moanos [he/him] 2024-11-21 22:50:04 +01:00
parent 14547ad621
commit 27541c6fb6
3 changed files with 50 additions and 5 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2024-11-21 19:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fellchensammlung', '0024_alter_animal_sex'),
]
operations = [
migrations.AlterField(
model_name='animal',
name='sex',
field=models.CharField(choices=[('F', 'Weiblich'), ('M', 'Männlich'), ('M_N', 'Männlich, kastriert'), ('F_N', 'Weiblich Kastriert'), ('I', 'Intersex')], max_length=20),
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2024-11-21 21:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fellchensammlung', '0025_alter_animal_sex'),
]
operations = [
migrations.AlterField(
model_name='animal',
name='sex',
field=models.CharField(choices=[('F', 'Weiblich'), ('M', 'Männlich'), ('M_N', 'Männlich, kastriert'), ('F_N', 'Weiblich, kastriert'), ('I', 'Intergeschlechtlich')], max_length=20),
),
]

View File

@ -461,11 +461,20 @@ class AdoptionNoticeStatus(models.Model):
class SexChoices(models.TextChoices): class SexChoices(models.TextChoices):
MALE_NEUTERED = "M_N", "neutered male" FEMALE = "F", _("Weiblich")
MALE = "M", "male" MALE = "M", _("Männlich")
FEMALE_NEUTERED = "F_N", "neutered female" MALE_NEUTERED = "M_N", _("Männlich, kastriert")
FEMALE = "F", "female" FEMALE_NEUTERED = "F_N", _("Weiblich, kastriert")
INTER = "I", "intersex" INTER = "I", _("Intergeschlechtlich")
class SexChoicesWithAll(models.TextChoices):
FEMALE = "F", _("Weiblich")
MALE = "M", _("Männlich")
MALE_NEUTERED = "M_N", _("Männlich, kastriert")
FEMALE_NEUTERED = "F_N", _("Weiblich Kastriert")
INTER = "I", _("Intergeschlechtlich")
ALL = "A", _("Alle")
class Animal(models.Model): class Animal(models.Model):