(self, user)
Register a vote from the user for the current object
Register a vote from the user for the current object
Register a vote from the user for the current object
def vote(self, user):
        """Register a vote from the user for the current object"""
        Vote.objects.get_or_create(
            user=user,
            content_type=ContentType.objects.get_for_model(self),
            object_id=obj.pk,
        )
def vote ( self , user ) : Vote . objects . get_or_create ( user = user , content_type = ContentType . objects . get_for_model ( self ) , object_id = obj . pk , )