... | ... | @@ -426,7 +426,7 @@ print(json.dumps(seria.data), indent=2) |
|
|
|
|
|
### 6.2.3 - api.serializers.NamespacedHMSerializer
|
|
|
|
|
|
This serializer is a simple subclass of `rest_framework.serializers.HyperlinkedModelSerializer` to support the use of namespaced URL (which is not supported because considered not useful for an API and also I think to complex to implement for any namespacing). This serializer will behave exactly as the other one but all URL resolving for related models is done in the namespace 'api', where are all Re2o's API URLs. Without this modification, either the namespacing need to be remove for the whole API or the serializer will fail resolving the URL, so consider using this serializer instead of `rest_framework.serializers.HyperlinkedModelSerializer`.
|
|
|
This serializer is a simple subclass of `rest_framework.serializers.HyperlinkedModelSerializer` to support the use of namespaced URL (which is not supported because considered not useful for an API and also I think too complex to implement for any namespacing). This serializer will behave exactly as the other one but all URL resolving for related models is done in the namespace 'api', where are all Re2o's API URLs. Without this modification, either the namespacing need to be removed for the whole API or the serializer will fail resolving the URL, so consider using this serializer instead of `rest_framework.serializers.HyperlinkedModelSerializer`.
|
|
|
|
|
|
|
|
|
## 6.3 - Control the output field
|
... | ... | |