-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic pdf export view, add Breed model
- Loading branch information
1 parent
918e716
commit 89e5fae
Showing
14 changed files
with
168 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,7 @@ | |
"django_bootstrap5", | ||
"django_filters", | ||
"widget_tweaks", | ||
"django_xhtml2pdf", | ||
] | ||
|
||
LOCAL_APPS = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
dragonroost/animals/migrations/0002_species_has_breeds_breed.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 5.0.9 on 2024-11-26 19:57 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('animals', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='species', | ||
name='has_breeds', | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.CreateModel( | ||
name='Breed', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=80, unique=True)), | ||
('origin', models.CharField(blank=True, max_length=80)), | ||
('temperament', models.CharField(choices=[('ACTIVE', 'Active'), ('ENERGETIC', 'Energetic'), ('GENTLE', 'Gentle'), ('INDEPENDENT', 'Independent')], default='ACTIVE', max_length=80)), | ||
('species', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='breeds', to='animals.species')), | ||
], | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
dragonroost/animals/migrations/0003_animal_breed_alter_species_class_name.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 5.0.9 on 2024-11-26 21:42 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('animals', '0002_species_has_breeds_breed'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='animal', | ||
name='breed', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='animals', to='animals.breed'), | ||
), | ||
migrations.AlterField( | ||
model_name='species', | ||
name='class_name', | ||
field=models.CharField(choices=[('MAMMAL', 'Mammal'), ('REPTILE', 'Reptile'), ('BIRD', 'Bird'), ('AMPHIBIAN', 'Amphibian'), ('INSECT', 'Insect'), ('FISH', 'Fish')], default='REPTILE', max_length=20), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 5.0.9 on 2024-11-26 21:44 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('animals', '0003_animal_breed_alter_species_class_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='animal', | ||
name='breed', | ||
field=models.ForeignKey(blank=True, default='', on_delete=django.db.models.deletion.SET_DEFAULT, related_name='animals', to='animals.breed'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 5.0.9 on 2024-11-26 22:07 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('animals', '0004_alter_animal_breed'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='animal', | ||
name='breed', | ||
field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='animals', to='animals.breed'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters