KristianOellegaard/django-hvad — pull request #220 by spectras (2014-12-17 04:12:47+00:00)
Title: Support for Django REST framework.

We will be adding official support for Django REST framework.
This pull request will track progress.

As of today, this code works, but lacks some features, namely:
- translatable fields cannot be used in the serializer's meta settings: `fields`, `exclude`, `read_only_fields`. They are always included, period.
- test cases. This will not be merged until properly tested.
- documentation.

For those who want to help, or are not afraid of living on the edge and want REST support, you use it this way:
```python
from hvad.contrib.restframework import HyperlinkedModelSerializer

class MyModelSerializer(HyperlinkedModelSerializer):
# your definition as usual
```
Doing this will include your translatable fields, with read/write access. Each object will also gain a `language_code` field. Including it when POST-ing or PUT-ing is mandatory. For PATCH-ing, it is only mandatory if a translatable field is included in the request.