add unique slug to keywords
This commit is contained in:
parent
a2fc4eb8b8
commit
adac986018
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 3.2.21 on 2023-10-01 22:51
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('blog', '0010_auto_20230930_2331'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='blogpost',
|
||||||
|
name='thumbnail',
|
||||||
|
field=models.ImageField(blank=True, default='img/thumbnails/default.jpg', upload_to='img/thumbnails'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='category',
|
||||||
|
name='slug',
|
||||||
|
field=models.SlugField(unique=True),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 3.2.21 on 2023-10-01 22:52
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('start', '0012_auto_20230930_2331'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='keyword',
|
||||||
|
name='slug',
|
||||||
|
field=models.SlugField(default='foo', unique=True),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
]
|
|
@ -16,6 +16,7 @@ class Keyword(models.Model):
|
||||||
"""
|
"""
|
||||||
this is the model that should contain searchable keywords
|
this is the model that should contain searchable keywords
|
||||||
"""
|
"""
|
||||||
|
slug = models.SlugField(unique=True)
|
||||||
text_de = models.CharField(max_length=40)
|
text_de = models.CharField(max_length=40)
|
||||||
text_en = models.CharField(max_length=40)
|
text_en = models.CharField(max_length=40)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue