code: def _permalink(self, absolute=False, expand=True, **kwargs):
          
          return flask.url_for('entry',
                               entry_id=self._record.id,
                               category=self._record.category if expand else None,
                               slug_text=self._record.slug_text if expand else None,
                               _external=absolute,
                               **kwargs)
docs: Returns a canonical URL for the item