lionleaf / dwitter

Social network for short js demos
https://www.dwitter.net
Apache License 2.0
764 stars 69 forks source link

Change the remix-of field to embed the dweet instead of just pk #491

Closed lionleaf closed 4 years ago

lionleaf commented 4 years ago

Required for https://github.com/dwitter-net/dwitter-frontend/pull/33

sigvef commented 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).

lionleaf commented 4 years ago

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.