get_or_create http://docs.djangoproject.com/en/dev/ref/models/querysets/#get-or-create-kwargs
R. On Sep 22, 7:55 pm, John M <[EMAIL PROTECTED]> wrote: > Is there a method I can call in a view that given a key, it checks to > see if that object exists and if it does returns that object, or if it > doesn't, adds it to the DB and returns the new key? > > I could have sworn there was a shortcut for this. > > Thanks > > John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---