Changed work of shelf books

This commit is contained in:
maciejrusek
2026-03-22 14:19:17 +01:00
parent 5722f0b7ea
commit aeab43aa8a
23 changed files with 307 additions and 140 deletions

View File

@@ -0,0 +1,28 @@
# Generated by Django 6.0.3 on 2026-03-22 12:16
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('authors', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Book',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('isbn', models.CharField(max_length=13)),
('authors', models.ManyToManyField(related_name='books', to='authors.author')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='books', to=settings.AUTH_USER_MODEL)),
],
),
]