O'Reilly logo
  • Pawel Konieczny thinks this is interesting:

article.url()

From

Cover of Building Web Applications with Flask

Note

This requires defining the following method in class Article:
def url(self):
return url_for('.articles', article_id=self.id)

import url_for from flask