Allow longer slugs
This commit is contained in:
parent
afc3203ff2
commit
76fcefccf1
2 changed files with 19 additions and 1 deletions
18
articles/migrations/0018_auto_20200821_1232.py
Normal file
18
articles/migrations/0018_auto_20200821_1232.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.1 on 2020-08-21 10:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("articles", "0017_auto_20200820_1606"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="article",
|
||||
name="slug",
|
||||
field=models.SlugField(max_length=255, unique=True),
|
||||
),
|
||||
]
|
|
@ -45,7 +45,7 @@ class Article(AdminUrlMixin, models.Model):
|
|||
updated_at = models.DateTimeField(auto_now=True)
|
||||
author = models.ForeignKey(User, on_delete=models.PROTECT, default=1)
|
||||
views_count = models.IntegerField(default=0)
|
||||
slug = models.SlugField(unique=True)
|
||||
slug = models.SlugField(unique=True, max_length=255)
|
||||
|
||||
objects = ArticleManager()
|
||||
with_pages = models.Manager()
|
||||
|
|
Reference in a new issue