Robert Singer
Robert Singer
I appreciate the thoughtful ideas here. For you first point, I see two possibilities: a) The resource is defined as a class attribute on the policy, eg ```python class ArticleAccessPolicy(AccessPolicy):...
Hi there, this should work with reverse relationships. You'd just need to make sure that the "source" arg matches what you've configured via the `related=` arg on your model FK....
Ah, so this is something I need to document. If you want to lazily evaluate the reference to your nested serializer class from a string inside `expandable_feilds`, you need to...
Django REST Framework offers a way to do custom exception handlering: https://www.django-rest-framework.org/api-guide/exceptions/#custom-exception-handling If that doesn't provide a solution for you, I'm glad to find out more about your use case...
I have never faced this issue, but maybe there could be a method on the policy class called `get_membership()`? You could implement caching there, with the key based on the...
That's really clever. I'm just not sure how to integrate this. This seems to focus on "make it easy to have a skinny default representation, but include other fields on...
Hi there, apologies for the delay. Unfortunately, I haven't had a chance to look into this yet. I'm on vacation next week, but should be able to look at this...
hi @noodlebreak, I'm not sure from the linked example how you'd like the behavior tweaked. When you request `http://api.mlocal.com/api/v1/categories/?fields=id,value,children`, do you want the serialized items of the `children` array to...
Ah yes, thanks for noting this. This does not currently work, but I will certainly look into adding support for it. The current assumption is that your request for sparse...
Sure! I appreciate the bump. I think you could work from the `apply_flex_fields` method to pass the correct values to the child fields: https://github.com/rsinger86/drf-flex-fields/blob/master/rest_flex_fields/serializers.py#L53 Normally, the `expand`, `fields` and `omit`...