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
Refs -- #18597 feat(BaseModelFormSet): Cleanup queryset prep in init and instance fetching #14188
Conversation
e55642e
to
d5e0433
Compare
@WhyNotHugo want to have a look? |
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.
Makes sense to me. I assume the intent is to follow up with a PR that changes _get_instance_by_queryset_index
to use a pre-fetched queryset.
yes but also allow overriding it in general without rewriting a lot of methods(and also not rewriting the whole constructor just to overwrite how queryset is prepared) |
If the intent is for it to be overridden, then I don't think the name should start with |
I was more interested denote that they are protected and should only be used by subclasses. I was having in mind |
…and instance fetching
d5e0433
to
759043f
Compare
fixed @WhyNotHugo feel free to have a look |
Everything looks good to me, but I'm not a maintainer. Maybe mention it here to get more eyes on it? |
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.
the thing that is missing is adding unit test for the changes
This is already covered by tests, the refactor doesn't really add new functionality to test, right? |
This PR adds new hooks to be overridden by subclasses. We should test if they can be used in the described scenario with |
Agreed. Docs are also important here.
|
@agalazis Do you have time to keep working on this? |
Yes I ll be back on it within next 2 weeks |
Closing due to inactivity. |
cleanup related to enabling custom prefetched inlines see https://code.djangoproject.com/ticket/18597