Django - SlugField
If you are working with Apache and some CMS (e.g. Wordpress), you will find yourself at least do the url rewrite thing once to make the url friendly. Something like translate: this: http://mydomain.com/?q=abcd to this: http://mydomain.com/abcd/ In Django, you dont have to worry about it because when creating apps, Django lets you define the url pattern (regex) for a particular view. It is used in a pre-defined view. How about the user-defined view, like a blog post which will be posted by a non-programmer user using a WYSIWYG editor of your app? What will the url look like? Django core developers (who develop the Django core) know that situation and create a Model Field name SlugField which will solve our problem: James Bennett's definition from the book "Practical Django projects": SlugField is a bit more interesting. It’s meant to store a slug: a short, meaningful piece of text, composed entirely of characters that are safe to use in a URL. You use Sl...