Create if doesn't exist
Model.objects.get_or_create()
In Django 1.7, you can also do:
Model.objects.update_or_create()
Looks like in newer versions of Django the save() function does an UPDATE or INSERT by default. See here.
Model.objects.get_or_create()
In Django 1.7, you can also do:
Model.objects.update_or_create()
Looks like in newer versions of Django the save() function does an UPDATE or INSERT by default. See here.