You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.
The metadata that can be obtained from options passed into serialize can be used to extract various field labels, docstrings, etc. about the resource. A new function serialize_docs (a clever name) could take the same options and a top-level model object that the resource represents.
>>>serialize_docs(User, **data_template)
{ ... }
This of course only works if the data is derived from a model or queryset. As an added bonus, if a model instance (rather than the model class) is passed in, the generated docs could provide an example value.
The text was updated successfully, but these errors were encountered:
The metadata that can be obtained from options passed into
serialize
can be used to extract various field labels, docstrings, etc. about the resource. A new functionserialize_docs
(a clever name) could take the same options and a top-level model object that the resource represents.This of course only works if the data is derived from a model or queryset. As an added bonus, if a model instance (rather than the model class) is passed in, the generated docs could provide an example value.
The text was updated successfully, but these errors were encountered: