Draft: support annotate parameter in field to allow ORM annotations#255
Draft: support annotate parameter in field to allow ORM annotations#255fjsj wants to merge 1 commit intoblb-ventures:mainfrom
Conversation
bellini666
left a comment
There was a problem hiding this comment.
This looks awesome! :) Excited for the final version of the PR
Left a small comment, other than that everything else seems fine and correct.
obs. Although we are both brazilians, I'll comment here in english in case anyone that doesn't speak portuguese is following this.
| else: | ||
| _relation_fields = (models.ManyToManyField, ManyToManyRel, ManyToOneRel) | ||
| _sentinel = object() | ||
| _annotate_placeholder = "______annotate_placeholder______" |
There was a problem hiding this comment.
Maybe just __annotated_placeholder__ would be enough? Any reason to be using 4 underscores?
There was a problem hiding this comment.
I can change to __annotated_placeholder__, it should be more than enough to avoid clashes. Also, if you have a suggestion on how to avoid this, please LMK. Unfortunately, I needed this workaround because field names aren't bind at class declaration moment.
Codecov Report
@@ Coverage Diff @@
## main #255 +/- ##
==========================================
- Coverage 88.35% 88.03% -0.32%
==========================================
Files 28 28
Lines 2833 2858 +25
==========================================
+ Hits 2503 2516 +13
- Misses 330 342 +12
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Incomplete: missing tests and docs.