Possible to use specs within pairs? #77
Unanswered
adammsteele
asked this question in
Q&A
Replies: 1 comment
-
Hi @adammsteele So sorry for the crazy delay in replying to this. I'm not sure how I missed it - I need to look at my notification settings for discussions 😬 You might've solved this already, but I think what you're trying to do isn't quite the right approach. Are you trying to filter your related def get_spec(self):
return [
'name',
{
'books_for_user' : {
"book_set": [
(lambda queryset: queryset.for_user(self.request.user), projectors.noop)
"title",
],
}
}
] In other words, you want to filter the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi (again),
When defining a spec, you can drop down a level to pairs for more control, but once you have done that, are you stuck at the pairs level within that key, or is there some way to start using spec notation again?
For example, imagine an author detail spec, where we need to provide a custom queryset to a relationship:
Just wanted to check if I was missing anything, but it doesn't seem possible since pairs don't know anything about specs.
Thanks,
Adam
Beta Was this translation helpful? Give feedback.
All reactions