feat: add choice with all
This commit is contained in:
parent
14547ad621
commit
27541c6fb6
18
src/fellchensammlung/migrations/0025_alter_animal_sex.py
Normal file
18
src/fellchensammlung/migrations/0025_alter_animal_sex.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
18
src/fellchensammlung/migrations/0026_alter_animal_sex.py
Normal file
18
src/fellchensammlung/migrations/0026_alter_animal_sex.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user