Add model Libros y serializadores
This commit is contained in:
30
app/libros/migrations/0002_libros.py
Normal file
30
app/libros/migrations/0002_libros.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Generated by Django 3.2.5 on 2021-07-09 16:33
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('libros', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Libros',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=255)),
|
||||
('genre', models.CharField(max_length=255)),
|
||||
('year', models.CharField(max_length=4)),
|
||||
('author', models.CharField(max_length=255)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Libro',
|
||||
'verbose_name_plural': 'Libros',
|
||||
'ordering': ('-created_at',),
|
||||
},
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user