Commit 7a55e49d authored by Julia Anishka's avatar Julia Anishka

made migrations

parent a14b4d1f
# Generated by Django 3.2 on 2023-03-27 09:29
# Generated by Django 3.2 on 2023-03-27 13:24
import bookshelf.models
import django.core.validators
......@@ -32,8 +32,8 @@ class Migration(migrations.Migration):
('title', models.CharField(max_length=70)),
('publisher', models.CharField(max_length=70)),
('year_published', models.IntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1000), django.core.validators.MaxValueValidator(2023)])),
('ISBN', models.CharField(max_length=13, validators=[django.core.validators.MinValueValidator(13), bookshelf.models.verify_int])),
('blurb', models.CharField(max_length=200, validators=[django.core.validators.MinValueValidator(100)])),
('ISBN', models.CharField(max_length=13, validators=[bookshelf.models.verify_ISBN])),
('blurb', models.TextField(validators=[bookshelf.models.verify_wordCount])),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bookshelf.author')),
],
),
......
# Generated by Django 3.2 on 2023-03-27 10:08
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bookshelf', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='books',
name='blurb',
field=models.TextField(max_length=200, validators=[django.core.validators.MinValueValidator(100)]),
),
]
# Generated by Django 3.2 on 2023-03-27 12:27
import bookshelf.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bookshelf', '0002_alter_books_blurb'),
]
operations = [
migrations.AlterField(
model_name='books',
name='blurb',
field=models.TextField(validators=[bookshelf.models.verify_wordCount]),
),
]
......@@ -33,7 +33,7 @@ class Books(models.Model):
year_published = models.IntegerField(null = True, blank = True,
validators=[MinValueValidator(1000), MaxValueValidator(datetime.now().year)]
)
ISBN = models.CharField(validators = [verify_ISBN])
ISBN = models.CharField(max_length = 13, validators = [verify_ISBN])
blurb = models.TextField(validators = [verify_wordCount])
def __str__(self):
......
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