In my admin.py file I am trying to use Prepopulated_fields to auto slug a title. It seems to have problems with short two letter words however. When I type in “Is”, “the” or “to”, it blanks it out of the slug. Also I tried “before” and the second I hit the E button, it blanked that out too. Is this expected with prepopulated fields or am I doing something wrong?
Models.py
title = models.CharField(max_length=255)
entry = models.TextField()
date_edited = models.DateTimeField(auto_now=True, verbose_name = "Last edited")
date_posted = models.DateTimeField(verbose_name="Post Date")
slug = models.SlugField(max_length=255, unique=True)
Admin.py
prepopulated_fields = {"slug": ("title",)}
Like @Alasdair said in his answer, there are words that get ignored when you use prepoulated_fields. Instead of overriding the js file that handles those words I turned the slug field from the title in the save_model.