I have table with data. Is it possible slug field automatically generated on existing table? Or is there any other alternative? Thanks
Here is my table
slugify template filter, you can write a script, or loop through the objects in the shell.
>>> from django.template.defaultfilters import slugify >>> for obj in MyModel.objects.all(): ... obj.slug = slugify(obj.title) ... obj.save()