Slug field doesn't appear to be auto populating


#1

I have an annoying issue where the slug field is not auto populating in admin. I have to fill the field in manually. Here’s my admin.py:-

from django.contrib import admin
from logbook.models import Trip

class TripAdmin(admin.ModelAdmin):
    model = Trip
    list_display = ('tripdate', 'waterway',)
    prepopulated_fields = {'slug': ('tripdate', 'waterway')}
   
admin.site.register(Trip)

#2

Try using only one thing, rather than two. For example: https://github.com/hellowebbooks/hellowebapp-code/blob/master/collection/admin.py#L10


#3

As per my other issue, I’ll check this today and let you know the outcome.