Maybe I misunderstand the purpose of Django\'s update_or_create Model method.
Here is my Model:
from django.db import models
import datetime
from vc.mode
You should separete your field:
for example: If I have the model:
class User(models.Model):
username = models.CharField(max_lenght=200)
nickname = models.CharField(max_lenght=200)
And I want to search for username = 'Nikolas' and update this instance nickname to 'Nik'(if no User with username 'Nikolas' I need to create it) I should write this code:
User.objects.update_or_create(
username='Nik',
defaults={'nickname': 'Nikolas'},
)
see in https://docs.djangoproject.com/en/2.0/ref/models/querysets/