1# models.py
2
3from django.db import models
4
5from django_extensions.db.fields import AutoSlugField
6
7class MyModel(models.Model):
8 title = models.CharField(max_length=42)
9 slug = AutoSlugField(populate_from=['title', 'description', 'get_author_name'])
10
11