fixed field tite in Books model

parent dfcd60ed
# Generated by Django 3.2 on 2023-03-27 06:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bookshelf', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='books',
name='title',
field=models.CharField(max_length=150),
),
]
...@@ -15,7 +15,7 @@ class Author(models.Model): ...@@ -15,7 +15,7 @@ class Author(models.Model):
class Books(models.Model): class Books(models.Model):
title = models.DateTimeField() title = models.CharField(max_length = 150)
author = models.ForeignKey(Author, on_delete=models.CASCADE) author = models.ForeignKey(Author, on_delete=models.CASCADE)
publisher = models.CharField(max_length=100) publisher = models.CharField(max_length=100)
year_published = models.IntegerField(default=0) year_published = models.IntegerField(default=0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment