[Django]-What is the difference between SlugField() vs CharField() in Django models

9👍

A slug is a string without special characters, in lowercase letters and with dashes instead of spaces, optimal to be used in URLs. An example of slug could be:

 example/this-is-a-slug/150

you can look for more information here Documentation django slug

CharField has max_length of 255 characters , and accept special characters.

About CharField Here

Leave a comment