Make url generation static so it doesn't require a view context.