-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Add format argument to UUIDField
#2788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
LGTM |
|
Seconded here. |
docs/api-guide/fields.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks truncated.
To allow serializations to control the representation format of a UUID value
|
+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we always going to be handling the int case correctly here? Any cases where that can just be an int, rather than a UUID instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure what potential problem you foresee here.
Which int case? The case where format is 'int', or the case where an int has somehow been passed to to_representation? None of the other fields check too rigorously for an incorrect type being passed to to_representation.
|
One query worth having a quikc think about but otherwise reckon I'm happy for this to go in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have examples here?
|
Okay one last comment regarding the docs. Otherwise good after that! :) |
|
Closing this in favor of #3000. |
format argument to UUIDField
|
@ovangle thanks for the PR. |
|
That's OK. I seem to have missed a couple of emails telling me to follow up on it. Sorry about that. |
|
@ovangle no problem at all |
To allow serializations to control the representation format of a
UUID value