Re: Trying to avoid duplicate form posts/database inserts

2008-10-30 Thread Stan Dyck
Thomas Guettler wrote: > Stan Dyck schrieb: > >> I'm converting a simple database-backed web form to Django. Each form >> submit inserts a row into a database. >> >> >> > > Hi, > > you can use yourmodel.objects.get_or_create(...) > To force the uniqueness on database level you should u

Re: Trying to avoid duplicate form posts/database inserts

2008-10-30 Thread Thomas Guettler
Stan Dyck schrieb: > I'm converting a simple database-backed web form to Django. Each form > submit inserts a row into a database. > > Hi, you can use yourmodel.objects.get_or_create(...) To force the uniqueness on database level you should use unique_together. > To avoid multiple posts ins