Hi, So easy :-)
Thanks i just didn't think of that hat. Kind regards . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:[email protected] Tel.: +43 (1) 534 52 - 1573 Fax: +43 (1) 534 52 - 146 -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Casey Greene Gesendet: Mittwoch, 09. März 2011 14:12 An: [email protected] Betreff: Re: automated query if already exists Hi Patrick, Does get not do what you want? http://docs.djangoproject.com/en/dev/topics/db/queries/#retrieving-a-single-object-with-get Hope this helps, Casey On 03/09/2011 08:03 AM, Szabo, Patrick (LNG-VIE) wrote: > Hi, > > Since django is able to do so much so easy i was wandering if there was > some kind of possibility to check if an entry with the same values > already exists. > > I've tried unique_together but this only does the job on the database > end and if i want to store an not unique object i get an error. > > I'd rather not show that error but return my own message. > > Is there a simpler way to do this thatn check alle the entries "manually" > > Kind regards > > . . . . . . . . . . . . . . . . . . . . . . . . . . > > ** > > Patrick Szabo > XSLT Developer > > LexisNexis > Marxergasse 25, 1030 Wien > > [email protected] <mailto:[email protected]> > > Tel.: +43 (1) 534 52 - 1573 > > Fax: +43 (1) 534 52 - 146 > > > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

