¿Qué es este código add_to_serializer en todos estos plugins?

If possible, can you please share the link of the plugin that you were working on at that time?

1 me gusta

Thanks for the great explanations. Am I right to assume that it would be possible to use add_to_serializer, something like op_likes? I’m not sure why this happens, but I can only have access to the op_likes_count when I order by it (as in order=op_likes), but I wanted to have such numbers without having to order by it.

Is there also a way to use it from JavaScript? I’m currently looking at `showOpLikes` doesn't work right away, but after clicking back and forth - #6 by pfaffman which was closed.

No, you can’t change an API from a client :slight_smile:

1 me gusta

This should absolutely not be the default. Not all user custom fields should be displayed to the user (e.g. see Staff Notes).

5 Me gusta

I wonder if “add to serializer” could be a checkbox when creating a custom user field in the UI. And then the PR could be to check if the custom user field has add to serializer and then if so, add it.

4 Me gusta

5 posts were split to a new topic: Adding to user serializer does not work for the current user object