Re: Improvement to objects.get_or_create and objects.update_or_create

2014-08-25 Thread Benjamin Scherrey
Hi Andrew, Thanx for the feedback. I'm glad to hear you've independently encountered the same issue as I have. 1) unique_together would not be difficult to handle but I also don't think it's necessarily an absolute requirement. The default behavior would ultimately take advantage of a

Re: Improvement to objects.get_or_create and objects.update_or_create

2014-08-25 Thread Andrew Farrell
I have long wanted something like this. However, it would need to be able to handle: 1) possible unique_together clauses 2) communicating clearly to the user what it tried to do and what went wrong when it errors The thing that has made me wary of suggesting something like this is the fact that

Improvement to objects.get_or_create and objects.update_or_create

2014-08-25 Thread Benjamin Scherrey
Just want to run an idea by the list for a feature improvement for the oft-used convenience functions get_or_create and update_or_create. I'll just talk about get_or_create for now on but everything I saw going forward applies to both. It's a common idiom to populate a dictionary and simply pass