Closed lionleaf closed 4 years ago
You could make a new, smaller serializer (NestedDweetSerializer, SparseDweetSerializer, something like that), and embed that in the DweetSerializer to avoid recursion. That way, we can also only expose what we need in the nested version (e.g. perhaps not all of the comments).
Good suggestion! See new changes. I included more than needed right away, as I can see the code etc of the original being useful for some views (say render it on hover) for either later additions or more importantly, other projects using the API.
Required for https://github.com/dwitter-net/dwitter-frontend/pull/33
make lint
to ensure that all the files are formatted and using best practices.