feat: Add basic flow to add adoption notices
This commit is contained in:
@@ -1,73 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-17 22:05
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Location',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('postcode', models.CharField(max_length=200)),
|
||||
('country', models.CharField(choices=[('DE', 'Germany'), ('AT', 'Austria'), ('CH', 'Switzerland')], max_length=20)),
|
||||
('description', models.TextField(blank=True, null=True, verbose_name='Description')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Species',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(help_text='Enter a animal species', max_length=200, verbose_name='Name')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Species',
|
||||
'verbose_name_plural': 'Species',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='RescueOrganization',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('trusted', models.BooleanField(default=False, verbose_name='Trusted')),
|
||||
('instagram', models.URLField(blank=True, null=True, verbose_name='Instagram profile')),
|
||||
('facebook', models.URLField(blank=True, null=True, verbose_name='Facebook profile')),
|
||||
('fediverse_profile', models.URLField(blank=True, null=True, verbose_name='Fediverse profile')),
|
||||
('website', models.URLField(blank=True, null=True, verbose_name='Website')),
|
||||
('location', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='fellchensammlung.location')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AdoptionNotice',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('created_at', models.DateField(verbose_name='Created at')),
|
||||
('searching_since', models.DateField(verbose_name='Searching for a home since')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('description', models.TextField(blank=True, null=True, verbose_name='Description')),
|
||||
('further_information', models.URLField(blank=True, null=True, verbose_name='Link to further information')),
|
||||
('group_only', models.BooleanField(default=False, verbose_name='Only group adoption')),
|
||||
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='fellchensammlung.rescueorganization', verbose_name='Organization')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Animal',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('date_of_birth', models.DateField(blank=True, null=True, verbose_name='Date of birth')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('description', models.TextField(blank=True, null=True, verbose_name='Description')),
|
||||
('adoption_notice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fellchensammlung.adoptionnotice')),
|
||||
('species', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='fellchensammlung.species')),
|
||||
],
|
||||
),
|
||||
]
|
@@ -1,22 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-18 09:33
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='animal',
|
||||
name='adoption_notice',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='adoptionnotice',
|
||||
name='animals',
|
||||
field=models.ManyToManyField(to='fellchensammlung.animal'),
|
||||
),
|
||||
]
|
@@ -1,24 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-18 13:25
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0002_remove_animal_adoption_notice_adoptionnotice_animals'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='MarkdownContent',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=100)),
|
||||
('content', models.TextField()),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Markdown content',
|
||||
},
|
||||
),
|
||||
]
|
@@ -1,36 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-18 16:08
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0003_markdowncontent'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Image',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=200)),
|
||||
('image', models.ImageField(upload_to='images')),
|
||||
('alt_text', models.TextField(max_length=2000)),
|
||||
('uploaded_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='adoptionnotice',
|
||||
name='photos',
|
||||
field=models.ManyToManyField(blank=True, to='fellchensammlung.image'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='animal',
|
||||
name='photos',
|
||||
field=models.ManyToManyField(blank=True, to='fellchensammlung.image'),
|
||||
),
|
||||
]
|
@@ -1,19 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-19 04:50
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0004_image_adoptionnotice_photos_animal_photos'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='animal',
|
||||
name='sex',
|
||||
field=models.CharField(choices=[('M_N', 'male_neutered'), ('M', 'male'), ('F_N', 'female_neutered'), ('F', 'female')], default='female', max_length=20),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
@@ -1,20 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-19 04:51
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0005_animal_sex'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='animal',
|
||||
name='date_of_birth',
|
||||
field=models.DateField(default=datetime.datetime(2024, 3, 19, 4, 51, 44, 367516, tzinfo=datetime.timezone.utc), verbose_name='Date of birth'),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user