Re: how do I create a slug in Django 2.2

2019-04-09 Thread Robin Riis
def save(self, *args, **kwargs): self.slug = slugify(self.title) super(name, self).save(*args, **kwargs) Den tis 9 apr. 2019 12:24AMI FIDELE skrev: > I have tried to create a slug watch here and please tell the problem > > this is model.py > > from django.db import models > > # this is

how do I create a slug in Django 2.2

2019-04-09 Thread AMI FIDELE
I have tried to create a slug watch here and please tell the problem this is model.py from django.db import models # this is my models class Article(models.Model): title = models.CharField(max_length=100) slug = models.SlugField() body = models.TextField() date =