Fix slug not being editable

Editable means also settable. I wanted it not to change after setting,
but to no avail...
newer-dal
LEdoian 4 years ago
parent ff5a5549d4
commit 3b90437afc

@ -0,0 +1,18 @@
# Generated by Django 3.1.6 on 2021-02-16 04:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wishlist', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='wishlist',
name='slug',
field=models.SlugField(help_text="URL suffix for this wishlist. Must not clash existing ones, nor be 'user' nor 'item'.", primary_key=True, serialize=False),
),
]

@ -5,7 +5,7 @@ class WishList(models.Model):
# Meta class? # Meta class?
slug = models.SlugField(max_length=50, blank=False, primary_key=True, editable=False, help_text="URL suffix for this wishlist. Must not clash existing ones, nor be 'user' nor 'item'.") slug = models.SlugField(max_length=50, blank=False, primary_key=True, help_text="URL suffix for this wishlist. Must not clash existing ones, nor be 'user' nor 'item'.")
name = models.TextField(help_text="The title of the wishlist.") name = models.TextField(help_text="The title of the wishlist.")
description = models.TextField(blank=True, help_text="Optional (public) description of the wishlist.") description = models.TextField(blank=True, help_text="Optional (public) description of the wishlist.")
owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, help_text="The user owning this wishlist.") owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, help_text="The user owning this wishlist.")

Loading…
Cancel
Save