Re: How to check if instance with same values exists

2008-04-07 Thread Sebastjan Trepca
You'll have a problem with multiple threads/processes that cannot be solved on the Python level eg. 2 requests that would simultaneously try to create an instance. If your create requests aren't very dense, it would probably work with hooking on a pre_save signal and checking if it already ex

Re: How to check if instance with same values exists

2008-04-07 Thread Thomas Guettler
meppum schrieb: > I want to check the values of every new instance before I save it to > make sure that it doesn't match an instance that already exists in the > database. I know I could use db constraints and use the > unique_together setting but is there a way to do this in code? Is > there a wa