Commits

Steve Losh  committed f9bb5ad

urls: initial commit

  • Participants
  • Parent commits 72d6370

Comments (0)

Files changed (1)

File garter/urls.py

+from flask import url_for
+from werkzeug.routing import BuildError
+
+def permalink(function):
+    def inner(*args, **kwargs):
+        endpoint, values = function(*args, **kwargs)
+        try:
+            return url_for(endpoint, **values)
+        except BuildError:
+            return
+    return inner
+