I am working on a django project and would like to include slug at the end of the url as it is done here on stackoverflow.com: http://example.com/object/1/my-slug-generated-from-my-title
The identifier of the object will be used to search for the element, not for slug - and, like stackoverflow.com, the pool will not have any value when receiving a link (only when it is displayed).
Qestion : is there a drawback (or growth potential) for generating a bullet dynamically, and not for saving it as a real database field?
For example (not real code):
class Widget(models.Model):
title = models.CharField()
def _slug(self):
return slugify(self.title)
slug = property(_slug)
Instead of using something like AutoSlugField ( for example )?
, , , .
!