def link(field, desc):
    def _link(self):
        return '<a href="%(url)s">%(url)s</a>' % {'url': getattr(self, field)}
    _link.short_description = desc
    _link.allow_tags = True
    return _link