twilio/flask-restful — pull request #316 by tonnydourado (2014-10-17 00:39:07+00:00)
Title: Fixed fields.Url to allow it to be used with blueprints

The `Url` field would raise an `BuildError` if you used it with a blueprint with a `url_prefix`, and didn't added this prefix on the endpoint in the `Url` constructor. Since adding the blueprint url prefix again in the `Url` constructor sort of defeats the point of having it declared on the blueprint, I made this change so, if there's no endpoint, the Url will get it from the request context. Now it can be used like this, for instance:

```
todo_fields = {
'id': fields.Integer,
'task': fields.String,
'uri': fields.Url(absolute=True)
}
```

I'm not 100% sure the tests I wrote are correct, though, so, if anyone can improve/fix/tell me what's wrong, I'll be glad to fix it.