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