a more reliable way of getting the view function for a given endpoint
t Merge branch 'endpoint-render-fix'