This is a pretty simple Django question, but I can\'t find the answer in the Django docs, despite lots of hunting!
How do I check whether an object already exists, and o
You can use get(), but you'll have to wrap it with try-except like this:
try: obj = UserToUserRole.objects.get(from_user=current_user, to_user=user, role='follow') except UserToUserRole.DoesNotExist: # here write a code to create a new object