What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-09 14:43:03
django admin slug auto populate
#models.py from django.db import models from django_extensions.db.fields import AutoSlugField class MyModel(models.Model): title = models.CharField(max_length=42) slug = AutoSlugField(populate_from=['title', 'description', 'get_author_name']) Add solution -
Python 2021-08-30 16:05:01
autoslugfield django 3
# models.py from django.db import models from django_extensions.db.fields import AutoSlugField class MyModel(models.Model): title = models.CharField(max_length=42) slug = AutoSlugField(populate_from=['title', 'description', 'get_author_name']) Add solution