-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Provide UUIDField option for pk field and a natural key feature for serialization #428
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Thanks for the PR @mathiasag7. Could you revert back changes that don't specifically apply to the feature? For example newlines, quotes, language changes, etc.? I'll mark them as comments. |
get_pk_format() always returns a valid value
Codecov Report
@@ Coverage Diff @@
## master #428 +/- ##
==========================================
+ Coverage 89.87% 90.44% +0.57%
==========================================
Files 23 26 +3
Lines 770 816 +46
Branches 106 105 -1
==========================================
+ Hits 692 738 +46
Misses 56 56
Partials 22 22
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Apologies for the delay on the feedback. I'm recovering from being ill so am catching up on things.
I actually thought it might be useful, but the idea came from a project we were working on where we needed to copy data from one database to another from time to time, and to do this we chose django's serialization / deserialization process. To do this, we chose to serialize and deserialize objects. To this we coupled the use of django's feature natural key, which allows unique values to be used instead of pk during serialization. However, if this feature isn't crucial and necessary, we can remove it. |
Thanks for the explanation. Let's keep it but call it out as a new feature. Thoughts? Edit: Doh! I see you already did that. I'm going to update some docstrings and then get this merged. |
- Added constants for default char field length and field mapping. - Reorganized imports for better clarity and readability. - Refactored `get_pk_format` function to leverage a predefined mapping and provide better flexibility. - Enhanced the documentation for the `get_pk_format` function to explain its purpose and return value.
for more information, see https://pre-commit.ci
Hello, I just wanted to inform you that this version of django eav is not yet available to be installed directly with pip in a project. |
#427 Feature
Only things haven't written a test case for it. I would have been happy to do it but still learning how to do so.