tomchristie/django-rest-framework — pull request #2023 by jarrodb (2014-11-04 23:33:29+00:00)
Title: Accomodate passing the full resource object to HyperlinkedRelatedFields instead of just the URL

Currently, the HyperLinkedRelated field allows for only the URL (startswith(('http:', 'https:'))) to define the relation. My proposed patch would allow for passing the entire object or an object with just the URL_FIELD_NAME:

Currently
---
```python
{'user': 'http://testserver/v1/users/1/'}
```

Add support for
---
```python
{'user': {
'url': 'http://testserver/v1/users/1/',
'first_name': 'Tom',
'last_name': 'Christie',
'email': 'tom@christie.com',
}
}
```

I would also propose patches (that I already use in production) to support the ability to reference related detail keys as full objects to easier denote relations on the client if this is accepted.