Re: PostGres 9.5 Upsert

2016-02-01 Thread john . parton
It should be possible to use a "RETURNING" clause to get the new row even in the instance of a get_or_create. I occasionally use an UPDATE ... RETURNING query with Manager.raw to update a table and get modified instances in one shot. On Tuesday, January 12, 2016 at 12:54:03 PM UTC-6, bliy...@re

ForeignKey in Inline generates lots of queries

2014-02-20 Thread john . parton
I posted this to Django users, but didn't get a response. I'd like to help to resolve this issue if at all possible. Previous post: I have the Django admin configured with a TabularInline, and the inline model has a ForeignKey reference to a third model. Every row in the inline generates a new