title: Better to save a slug to the DB or generate dynamically?
body: <p>I am working on a django project and would like to include a slug at the end of the url, as is done here on stackoverflow.com: <a href="http://example.com/object/1/my-slug-generated-from-my-title" rel="noreferrer">http://example.com/object/1/my-slug-generated-from-my-title</a></p>
  
  <p>The object ID will be used to look up the item, not the slug -- and, like stackoverflow.com, the slug won't matter at all when getting the link (just in displaying it).</p>
  
  <p><strong>Qestion</strong>: is there a downside (or upside) to generating the slug dynamically, rather than saving it as an actual database field ? </p>
  
  <p>For example (not <em>real</em> code):</p>
  
  <pre><code>class Widget(models.Model):
      title = models.CharField()
  
      def _slug(self):
        return slugify(self.title)
      slug = property(_slug)
  </code></pre>
  
  <p>Rather than using an something like an AutoSlugField (<a href="http://github.com/django-extensions/django-extensions/blob/master/django_extensions/db/fields/__init__.py" rel="noreferrer">for example</a>) ? </p>
  
  <p>Since my plan is to have it match the title, I didn't know if it made sense to have a duplicate field in the database.</p>
  
  <p>Thanks!</p>