Skip to content
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

Fixed #20826 -- Moved Manager.raw() and Manager._insert() to the QuerySet class. #1411

Closed
wants to merge 1 commit into from

Conversation

loic
Copy link
Member

@loic loic commented Jul 30, 2013

No description provided.

@mjtamlyn
Copy link
Member

I'm definitely in favour of moving _insert, it's a silly place for it to be. As for raw - it's kinda confusing to have it on queryset because `qs.filter(foo='bar').raw('...') becomes possible but totally ignores the filter. I think this is why it was on the manager to start with.

That said I can understand why with the other changes it is helpful to be able to call raw from a QS. It just needs to be really well documented that it ignores everything else.

@loic
Copy link
Member Author

loic commented Jul 30, 2013

@mjtamlyn: added a new commit with an update to the docs. The same could be said for create() and bulk_create() but I guess these two are less ambiguous.

.. warning::

``raw()`` always triggers a new query and doesn't account for previous
filtering. As such, it should generally be called from the `Manager` or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double `` here and next line

@timgraham
Copy link
Member

merged in acd1d43

@timgraham timgraham closed this Jul 31, 2013
@loic
Copy link
Member Author

loic commented Jul 31, 2013

Thanks for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants