March 2020
Intermediate to advanced
608 pages
17h 17m
English
You can use the primary keys in the URLs for the detail pages only if they are Universal Unique Identifiers (UUIDs) or generated random strings. Otherwise, create and use a slug field, as follows:
class Idea(UrlBase): slug = models.SlugField(_("Slug for URLs"), max_length=50)