asdfasdf

parent 8b95034d
# Generated by Django 3.2.4 on 2021-06-28 15:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('article', '0003_auto_20210624_2001'),
]
operations = [
migrations.CreateModel(
name='Genre',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=50, verbose_name='Название')),
],
),
]
# Generated by Django 3.2.4 on 2021-06-28 15:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('article', '0004_genre'),
]
operations = [
migrations.AddField(
model_name='genre',
name='description',
field=models.CharField(default='описание', max_length=100, verbose_name='Описание'),
),
]
# Generated by Django 3.2.4 on 2021-06-30 08:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('article', '0005_genre_description'),
]
operations = [
migrations.AlterField(
model_name='genre',
name='description',
field=models.CharField(max_length=100, verbose_name='Описание'),
),
]
...@@ -8,6 +8,7 @@ class Author(models.Model): ...@@ -8,6 +8,7 @@ class Author(models.Model):
def __str__(self): def __str__(self):
return f"{self.name} {self.last_name}" return f"{self.name} {self.last_name}"
class Article(models.Model): class Article(models.Model):
title = models.CharField(max_length=100, null=False, blank=False, verbose_name='Название') title = models.CharField(max_length=100, null=False, blank=False, verbose_name='Название')
content = models.TextField(max_length=3000, null=False, blank=False, verbose_name='Тело') content = models.TextField(max_length=3000, null=False, blank=False, verbose_name='Тело')
......
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