tomchristie/django-rest-framework — pull request #710 by fmartingr (2013-03-07 12:54:58+00:00)
Title: Fixed URLField not retrieving the max_length attribute from a ModelField

The rest framework wasn't sending the `max_length` kwarg to serializers.URLField, so the class was using always the default value even if overwritten on a django model.

Model:
```
class TestModel(models.Model):
name = models.CharField(max_length=512, blank=True)
url = models.URLField(blank=True, max_length=2000)

```

API result:
````
{
"url": [
"Ensure this value has at most 200 characters (it has 1540)."
]
}
```

Tested on SQLite & PostgreSQL.

Custom serializer fields were working fine.

Test results: https://travis-ci.org/fmartingr/django-rest-framework/builds/5312162