-
Here's how the def __init__(self, slug_field=None, **kwargs):
assert slug_field is not None, 'The `slug_field` argument is required.'
self.slug_field = slug_field
super().__init__(**kwargs) Wouldn't it be better to change def __init__(self, *, slug_field, **kwargs):
... |
Beta Was this translation helpful? Give feedback.
Answered by
Viicos
Jan 7, 2023
Replies: 1 comment
-
Looks like this would be a breaking change, as it will break for people using it this way: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Viicos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like this would be a breaking change, as it will break for people using it this way:
SlugRelatedField(many=True, slug_field="...")
.