1👍
Improve your slugify
function like this:
def slugify_function(self, content):
return content.replace("_", "-").replace(" ","-").replace("%20","-").lower()
A full library function is even better
It covers a wider variety of odd characters that you might come across occasionally.
from django.utils.text import slugify
Source:stackexchange.com