def create_node_rating_counts_settings(sender, **kwargs):
    """ create node rating count and settings"""
    created = kwargs['created']
    node = kwargs['instance']
    if created:
        # create node_rating_count and settings
        # task will be executed in background unless settings.CELERY_ALWAYS_EAGER is True
        # if CELERY_ALWAYS_EAGER is False celery worker must be running otherwise task won't be executed
        create_related_object.delay(NodeRatingCount, {'node': node})
        create_related_object.delay(NodeParticipationSettings, {'node': node})
def create_node_rating_counts_settings ( sender , ** kwargs ) : created = kwargs [ 'created' ] node = kwargs [ 'instance' ] if created : create_related_object . delay ( NodeRatingCount , { 'node' : node } ) create_related_object . delay ( NodeParticipationSettings , { 'node' : node } )
create node rating count and settings