Browse Source
Добавлены валидации для модели статьи и шаблон при успешном продвижении статьи.pull/32/head
Artur Galyamov
2 years ago
4 changed files with 33 additions and 5 deletions
@ -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), |
||||
), |
||||
] |
@ -0,0 +1,11 @@
|
||||
{% extends 'base.html' %} |
||||
{% block content %} |
||||
<div class="alert alert-success" role="alert"> |
||||
Статья продвинута успешно! |
||||
</div> |
||||
<a |
||||
href="{% url 'new-article' %}" |
||||
class="btn btn-primary"> |
||||
Продвиньте новую статью |
||||
</a> |
||||
{% endblock content %} |
Loading…
Reference in new issue