-
Hi! I'm trying to write a custom validator and am trying to figure out parent prefixes for current prefix. In API calls I can use "contains" search criteria, but I'm getting an error when trying to do: parents = Prefix.objects.filter(contains=instance.prefix) Any ideas/help appreciated. |
Beta Was this translation helpful? Give feedback.
Answered by
eviboo
Sep 6, 2023
Replies: 1 comment
-
Found the answer. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
eviboo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found the answer.
use .get_parents() method of the prefix.