Populated the models of the bookshelf app

parent 1c3d7ed3
# Generated by Django 4.1.7 on 2023-03-27 17:42
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bookshelf', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='book',
name='year_published',
field=models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(2023)]),
),
]
......@@ -15,7 +15,7 @@ class Book(models.Model):
title = models.CharField(max_length=100)
author = models.ForeignKey(Author, on_delete=models.CASCADE)
publisher = models.CharField(max_length=100)
year_published = models.PositiveIntegerField()
year_published = models.PositiveIntegerField(validators=[MaxValueValidator(2023)])
ISBN = models.IntegerField(validators=[MaxValueValidator(9999999999999)])
blurb = models.TextField(
validators=[
......
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