Get rid of url_for in Flask-Admin templates and widgets and provide get_url helper that's overridable