diff --git a/cms/migrations/0003_alter_article_link.py b/cms/migrations/0003_alter_article_link.py new file mode 100644 index 0000000..b6549c3 --- /dev/null +++ b/cms/migrations/0003_alter_article_link.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1.4 on 2022-12-19 13:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0002_remove_article_title_article_link'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='link', + field=models.CharField(default='https://zakonvremeni.ru/news/', max_length=200), + ), + ] diff --git a/cms/models.py b/cms/models.py index 18197c5..e7f00a5 100644 --- a/cms/models.py +++ b/cms/models.py @@ -2,5 +2,5 @@ from django.db import models class Article(models.Model): - body = models.TextField() - link = models.CharField(max_length=300, default='https://zakonvremeni.ru/news/') + body = models.TextField(null=False) + link = models.CharField(max_length=200, default='https://zakonvremeni.ru/news/') diff --git a/cms/templates/articles/created.html b/cms/templates/articles/created.html new file mode 100644 index 0000000..8d53679 --- /dev/null +++ b/cms/templates/articles/created.html @@ -0,0 +1,11 @@ +{% extends 'base.html' %} +{% block content %} +