Receivers

The following functions are currently tied to the signals generated in fiction_outlines. See Signals for additional information.

receivers.generate_headline_from_description(instance, *args, **kwargs)

Auto generate the headline of the node from the first lines of the description.

receivers.story_root_for_new_outline(instance, created, *args, **kwargs)

If a new instance of a Outline is created, also create the root node of the story tree.

receivers.arc_node_edit_add_missing_characters_and_locations_to_related_story_node(instance, action, reverse, pk_set, *args, **kwargs)

If an arc_element is modified and it’s characters/locations are not already in the story node, add them. We don’t assume that removing the arc element would change the characters or locations as of yet. This takes up a little more space in the database, but the additional flexibility for users is worth it.

receivers.story_node_add_arc_element_update_characters_locations(instance, created, *args, **kwargs)

If an arc element is added to a story element node, add any missing elements or locations.

Evaluates attempts to link an arc to a story node from another outline.

receivers.validate_character_instance_valid_for_arc(instance, action, reverse, pk_set, *args, **kwargs)

Evaluate attempts to assign a character instance to ensure it is from same outline.

receivers.validate_location_instance_valid_for_arc(instance, action, reverse, pk_set, *args, **kwargs)

Evaluates attempts to add location instances to arc, ensuring they are from same outline.

receivers.validate_character_for_story_element(instance, action, reverse, pk_set, *args, **kwargs)

Validates that character is from the same outline as the story node.

receivers.validate_location_for_story_element(instance, action, reverse, pk_set, *args, **kwargs)

Validates that location is from same outline as story node.

receivers.validate_generations_for_story_elements(instance, action, target_node_type=None, target_node=None, pos=None, *args, **kwargs)

Unlike arc nodes, for which we just warn about structure, the story tree allowed parent/child rules must be strictly enforced.