fiction_outlines package¶
Submodules¶
fiction_outlines.admin module¶
fiction_outlines.apps module¶
fiction_outlines.models module¶
-
class
fiction_outlines.models.Arc(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModelA MACE arc for a outline.
Parameters: - created (AutoCreatedField) – Created
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- mace_type (CharField) – The MACE type of the Arc.
- outline_id (ForeignKey) – Arc belongs to this outline.
- name (CharField) – Name of this Arc (makes it easier for you to keep track of it.)
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
arc_root_node¶ Returns the root node from this object’s ArcElementNode tree.
-
arcelementnode_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
current_errors¶ Returns list of errors from arc_validation.
-
fetch_arc_errors()[source]¶ Evaluates the current tree of the arc and provides a list of errors that the user should correct.
-
generate_template_arc_tree()[source]¶ Generate a seven point template in this arc. Arc must be empty.
-
get_mace_type_display(*, field=<django.db.models.fields.CharField: mace_type>)¶
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
mace_type¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
outline¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
outline_id¶
-
refresh_from_db(*args, **kwargs)[source]¶ Reload field values from the database.
By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.
Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.
When accessing deferred fields of an instance, the deferred loading of the field will call this method.
-
class
fiction_outlines.models.ArcElementNode(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModel,treebeard.mp_tree.MP_NodeTree nodes for the arc elements.
Parameters: - created (AutoCreatedField) – Created
- path (CharField) – Path
- depth (PositiveIntegerField) – Depth
- numchild (PositiveIntegerField) – Numchild
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- arc_element_type (CharField) – What part of the arc does this represent?
- arc_id (ForeignKey) – Parent arc.
- headline (CharField) – Autogenerated from description
- description (TextField) – Describe what happens at this moment in the story…
- story_element_node_id (ForeignKey) – Which story node is this element associated with?
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
add_child(arc_element_type, description=None, story_element_node=None, **kwargs)[source]¶ Overrides the default treebeard function, adding additional integrity checks.
-
add_sibling(pos=None, arc_element_type=None, description=None, story_element_node=None, **kwargs)[source]¶ Overrides the default treebeard function, adding additional integrity checks.
-
arc¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
arc_element_type¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
arc_id¶
-
assoc_characters¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
assoc_locations¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_arc_element_type_display(*, field=<django.db.models.fields.CharField: arc_element_type>)¶
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
headline¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_milestone¶ Does this node represent an arc milestone?
-
milestone_seq¶ Returns the milestone sequence based off of the arc element definitions.
-
parent_outline¶ Private method to fetch parent outline.
-
steplen= 5¶
-
story_element_node¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
story_element_node_id¶
-
exception
fiction_outlines.models.ArcGenerationError[source]¶ Bases:
fiction_outlines.models.ArcIntegrityErrorException for when a non-milestone node is placed at an invalid level of descendency.
-
exception
fiction_outlines.models.ArcIntegrityError[source]¶ Bases:
django.db.utils.IntegrityErrorGeneric exception for Arc structural warnings.
-
class
fiction_outlines.models.AutoLastModifiedField(*args, **kwargs)[source]¶ Bases:
model_utils.fields.AutoLastModifiedFieldOverride of the default model_utils behavior to ensure that when an instance is created that the modifed and created will be the same.
-
class
fiction_outlines.models.Character(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModelReusable character defintion model.
Parameters: - created (AutoCreatedField) – Created
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- name (CharField) – Name of the character.
- description (TextField) – Notes about the character to help you remember.
- user_id (ForeignKey) – The user that created this character.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
characterinstance_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
series¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
tagged_items¶ Accessor to the related objects manager on the one-to-many relation created by GenericRelation.
In the example:
class Post(Model): comments = GenericRelation(Comment)
post.commentsis a ReverseGenericManyToOneDescriptor instance.
-
user¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
user_id¶
-
class
fiction_outlines.models.CharacterInstance(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModelAn instance of the character object that can be associated with outlines.
Parameters: - created (AutoCreatedField) – Created
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- main_character (BooleanField) – Is this character the main character for the outline?
- pov_character (BooleanField) – Is this character a POV character?
- protagonist (BooleanField) – Does this character serve as the protagonist for this outline?
- antagonist (BooleanField) – Does this character serve as an antagonist for this outline?
- obstacle (BooleanField) – Is this character an obstacle in the outline? (not antagonist)
- villain (BooleanField) – Is the character a straight-out villain?
- character_id (ForeignKey) – Reference to originating character object.
- outline_id (ForeignKey) – Outline this instance is associated with.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
antagonist¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
arcelementnode_set¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
character¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
character_id¶
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
main_character¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
obstacle¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
outline¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
outline_id¶
-
pov_character¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
protagonist¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
storyelementnode_set¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
villain¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
fiction_outlines.models.GenericArcSequenceError[source]¶ Bases:
fiction_outlines.models.ArcIntegrityErrorException for when a non-milestone element is placed in an invalid sequence.
-
class
fiction_outlines.models.Location(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModelReusable location definition model
Parameters: - created (AutoCreatedField) – Created
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- name (CharField) – Name of the location.
- description (TextField) – Notes about the location to help you remember.
- user_id (ForeignKey) – The user that created this location.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
locationinstance_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
series¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
tagged_items¶ Accessor to the related objects manager on the one-to-many relation created by GenericRelation.
In the example:
class Post(Model): comments = GenericRelation(Comment)
post.commentsis a ReverseGenericManyToOneDescriptor instance.
-
user¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
user_id¶
-
class
fiction_outlines.models.LocationInstance(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModelAn instance of the given location that can be associated with a given outline.
Parameters: - created (AutoCreatedField) – Created
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- location_id (ForeignKey) – Originating location object.
- outline_id (ForeignKey) – Outline this object is associated with.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
arcelementnode_set¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
location¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
location_id¶
-
objects= <django.db.models.manager.Manager object>¶
-
outline¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
outline_id¶
-
storyelementnode_set¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
fiction_outlines.models.MilestoneDepthError[source]¶ Bases:
fiction_outlines.models.ArcIntegrityErrorException for when an attempt to make a milestone a descendent of any node besides the root node for the tree.
-
exception
fiction_outlines.models.MilestoneSequenceError[source]¶ Bases:
fiction_outlines.models.ArcIntegrityErrorException for when milestone arc elements violate their defined sequence rules.
-
class
fiction_outlines.models.Outline(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModelThe typical top of the hierarchy when not enclosed in a series.
Parameters: - created (AutoCreatedField) – Created
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- title (CharField) – Outline title. You can always change this later.
- description (TextField) – Optionally, describe the story. Or use for notes.
- series_id (ForeignKey) – Belongs to series.
- user_id (ForeignKey) – The user that created this outline.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
arc_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
characterinstance_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
create_arc(mace_type, name)[source]¶ Creates the story arc and initial tree for that arc for the current outline. Returns the resulting Arc instance.
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
length_estimate¶ Calculates and estimated word count based on number of characters, locations, and arcs. For reference see: http://www.writingexcuses.com/2017/07/02/12-27-choosing-a-length/
-
locationinstance_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
objects= <django.db.models.manager.Manager object>¶
-
refresh_from_db(*args, **kwargs)[source]¶ Reload field values from the database.
By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.
Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.
When accessing deferred fields of an instance, the deferred loading of the field will call this method.
-
series¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
series_id¶
-
story_tree_root¶ Fetches the root node for the outline’s StoryElementNode tree.
-
storyelementnode_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
tagged_items¶ Accessor to the related objects manager on the one-to-many relation created by GenericRelation.
In the example:
class Post(Model): comments = GenericRelation(Comment)
post.commentsis a ReverseGenericManyToOneDescriptor instance.
-
title¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
user_id¶
-
class
fiction_outlines.models.Series(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModelContainer object to hold multiple outline objects if necessary.
Parameters: - created (AutoCreatedField) – Created
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- title (CharField) – Name of the series. You can always change this later.
- description (TextField) – Jot down a description about your series.
- user_id (ForeignKey) – The user that created this Series.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
character_set¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
location_set¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
objects= <django.db.models.manager.Manager object>¶
-
outline_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
tagged_items¶ Accessor to the related objects manager on the one-to-many relation created by GenericRelation.
In the example:
class Post(Model): comments = GenericRelation(Comment)
post.commentsis a ReverseGenericManyToOneDescriptor instance.
-
title¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
user_id¶
-
class
fiction_outlines.models.StoryElementNode(*args, **kwargs)[source]¶ Bases:
fiction_outlines.models.TimeStampedModel,treebeard.mp_tree.MP_NodeTree nodes for the overall outline of the story.
Parameters: - created (AutoCreatedField) – Created
- path (CharField) – Path
- depth (PositiveIntegerField) – Depth
- numchild (PositiveIntegerField) – Numchild
- modified (AutoLastModifiedField) – Modified
- id (UUIDField) – Id
- name (CharField) – Optional name/title for this element of the story.
- description (TextField) – Optional description for this element of the story.
- outline_id (ForeignKey) – Parent outline.
- story_element_type (CharField) – What part of the story does this represent? A scene? A chapter?
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
add_child(story_element_type=None, outline=None, name=None, description=None, **kwargs)[source]¶ An override of the treebeard add_child() method so we can send a signal.
-
add_sibling(story_element_type=None, outline=None, name=None, description=None, pos=None, **kwargs)[source]¶ Override of treebeard api to allow us to send a signal.
-
all_characters¶ Returns a queryset of all characters associated with this node and its descendants, excluding any duplicates.
-
all_locations¶ Returns a queryset of all locations associated with this node and its descendants, excluding any duplicates.
-
arcelementnode_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
assoc_characters¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
assoc_locations¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
get_story_element_type_display(*, field=<django.db.models.fields.CharField: story_element_type>)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
impact_rating¶ Returns the impact rating for this node. Impact rating is a measure of how powerful this moment in the story is by evaluting how many simultaneous arc elements are associated with it. There is also a generational bleed element, where the impact score creates shockwaves throughout their direct ancestor and descendant nodes. This echo fades fast, but the bigger the impact, the farther it goes.
Currently, the impact bleed does not extend to sibling nodes.
WARNING: Here be dragons.
-
move(target, pos=None)[source]¶ An override of the treebeard api in order to send a signal in advance.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
outline¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
outline_id¶
-
steplen= 5¶
-
story_element_type¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
fiction_outlines.models.TimeStampedModel(*args, **kwargs)[source]¶ Bases:
model_utils.models.TimeStampedModelOverride the model_utils behavior to use our new field.
Parameters: - created (AutoCreatedField) – Created
- modified (AutoLastModifiedField) – Modified
-
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)¶
-
class
fiction_outlines.models.UUIDCharacterTag(*args, **kwargs)[source]¶ Bases:
taggit.models.GenericUUIDTaggedItemBase,taggit.models.TaggedItemBaseCharacter tags with UUID primary keys
Parameters: - id (AutoField) – Id
- tag_id (ForeignKey) – Tag
- content_type_id (ForeignKey) – Content type
- object_id (UUIDField) – Object id
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
content_object¶ Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
content_type¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
tag¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
class
fiction_outlines.models.UUIDLocationTag(*args, **kwargs)[source]¶ Bases:
taggit.models.GenericUUIDTaggedItemBase,taggit.models.TaggedItemBaseLocation tags with UUID primary keys
Parameters: - id (AutoField) – Id
- tag_id (ForeignKey) – Tag
- content_type_id (ForeignKey) – Content type
- object_id (UUIDField) – Object id
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
content_object¶ Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
content_type¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
tag¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
class
fiction_outlines.models.UUIDOutlineTag(*args, **kwargs)[source]¶ Bases:
taggit.models.GenericUUIDTaggedItemBase,taggit.models.TaggedItemBaseOutline tags with UUID primary keys
Parameters: - id (AutoField) – Id
- tag_id (ForeignKey) – Tag
- content_type_id (ForeignKey) – Content type
- object_id (UUIDField) – Object id
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
content_object¶ Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
content_type¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
tag¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
fiction_outlines.receivers module¶
Recieving methods for signals go here.
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.
-
fiction_outlines.receivers.generate_headline_from_description(sender, instance, *args, **kwargs)[source]¶ Auto generate the headline of the node from the first lines of the description.
-
fiction_outlines.receivers.story_node_add_arc_element_update_characters_locations(sender, instance, created, *args, **kwargs)[source]¶ If an arc element is added to a story element node, add any missing elements or locations.
-
fiction_outlines.receivers.story_root_for_new_outline(sender, instance, created, *args, **kwargs)[source]¶ If a new instance of a Outline is created, also create the root node of the story tree.
-
fiction_outlines.receivers.validate_against_prohibited_actions(sender, instance, action, target_node_type=None, target_node=None, pos=None, *args, **kwargs)[source]¶
-
fiction_outlines.receivers.validate_arc_links_same_outline(sender, instance, *args, **kwargs)[source]¶ Evaluates attempts to link an arc to a story node from another outline.
-
fiction_outlines.receivers.validate_character_for_story_element(sender, instance, action, reverse, pk_set, *args, **kwargs)[source]¶ Validates that character is from the same outline as the story node.
-
fiction_outlines.receivers.validate_character_instance_valid_for_arc(sender, instance, action, reverse, pk_set, *args, **kwargs)[source]¶ Evaluate attempts to assign a character instance to ensure it is from same outline.
-
fiction_outlines.receivers.validate_generations_for_story_elements(sender, instance, action, target_node_type=None, target_node=None, pos=None, *args, **kwargs)[source]¶ Unlike arc nodes, for which we just warn about structure, the story tree allowed parent/child rules must be strictly enforced.
fiction_outlines.signals module¶
Custom signals sent by this app.
Current list:
tree_manipulation: Sent when either the ArcElementNode or StoryElementNode trees have their structure manipulated.
fiction_outlines.urls module¶
URLs for fiction_outlines.
-
fiction_outlines.urls.path(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)¶
fiction_outlines.views module¶
Views for fiction_outlines.
-
class
fiction_outlines.views.ArcCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.CreateViewGeneric view for creating an arc.
-
fields= ['name', 'mace_type']¶
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
model¶ alias of
fiction_outlines.models.Arc
-
permission_required= 'fiction_outlines.edit_outline'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/arc_create.html'¶
-
-
class
fiction_outlines.views.ArcDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.DeleteViewGeneric view for deleting an arc
-
context_object_name= 'arc'¶
-
model¶ alias of
fiction_outlines.models.Arc
-
permission_required= 'fiction_outlines.delete_arc'¶
-
pk_url_kwarg= 'arc'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/arc_delete.html'¶
-
-
class
fiction_outlines.views.ArcDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewGeneric view for arc details.
-
context_object_name= 'arc'¶
-
model¶ alias of
fiction_outlines.models.Arc
-
permission_required= 'fiction_outlines.view_arc'¶
-
pk_url_kwarg= 'arc'¶
-
template_name= 'fiction_outlines/arc_detail.html'¶
-
-
class
fiction_outlines.views.ArcListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.list.ListViewGeneric list view for arcs in a outline
-
context_object_name= 'arc_list'¶
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
get_queryset()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
model¶ alias of
fiction_outlines.models.Arc
-
permission_required= 'fiction_outlines.view_outline'¶
-
template_name= 'fiction_outlines/arc_list.html'¶
-
-
class
fiction_outlines.views.ArcNodeCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.CreateViewCreate view for an arc node. Assumes that the target position has already been passed to it via kwargs.
-
form_class¶ alias of
fiction_outlines.forms.ArcNodeForm
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
model¶
-
permission_required= 'fiction_outlines.edit_arc'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/arcnode_create.html'¶
-
-
class
fiction_outlines.views.ArcNodeDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.DeleteViewView for deleting an arc node.
-
context_object_name= 'arcnode'¶
-
delete(request, *args, **kwargs)[source]¶ Call the delete() method on the fetched object and then redirect to the success URL.
-
model¶
-
permission_required= 'fiction_outlines.delete_arc_node'¶
-
pk_url_kwarg= 'arcnode'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/arcnode_delete.html'¶
-
-
class
fiction_outlines.views.ArcNodeDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewView for looking at the details of an atomic node as opposed to the whole tree.
-
context_object_name= 'arcnode'¶
-
model¶
-
permission_required= 'fiction_outlines.view_arc_node'¶
-
pk_url_kwarg= 'arcnode'¶
-
template_name= 'fiction_outlines/arcnode_detail.html'¶
-
-
class
fiction_outlines.views.ArcNodeMoveView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.UpdateViewView for executing a move method on an arcnode.
-
context_object_name= 'arcnode'¶
-
form_class¶ alias of
django.forms.widgets.ArcElementNodeForm
-
model¶
-
permission_required= 'fiction_outlines.edit_arc_node'¶
-
pk_url_kwarg= 'arcnode'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/arcnode_move.html'¶
-
-
class
fiction_outlines.views.ArcNodeUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.UpdateViewView for editing details of an arc node (but not it’s tree position).
-
context_object_name= 'arcnode'¶
-
form_class¶ alias of
fiction_outlines.forms.ArcNodeForm
-
model¶
-
permission_required= 'fiction_outlines.edit_arc_node'¶
-
pk_url_kwarg= 'arcnode'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/arcnode_update.html'¶
-
-
class
fiction_outlines.views.ArcUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,django.views.generic.edit.UpdateViewGeneric view for updating arc details
-
context_object_name= 'arc'¶
-
fields= ['name', 'mace_type']¶
-
model¶ alias of
fiction_outlines.models.Arc
-
permission_required= 'fiction_outlines.edit_arc'¶
-
pk_url_kwarg= 'arc'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/arc_update.html'¶
-
-
class
fiction_outlines.views.CharacterCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.edit.CreateViewGeneric view for creating a character.
-
form_class¶ alias of
fiction_outlines.forms.CharacterForm
-
model¶ alias of
fiction_outlines.models.Character
-
success_url= None¶
-
template_name= 'fiction_outlines/character_create.html'¶
-
-
class
fiction_outlines.views.CharacterDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.DeleteViewGeneric view for deleting a character.
-
context_object_name= 'character'¶
-
model¶ alias of
fiction_outlines.models.Character
-
permission_required= 'fiction_outlines.delete_character'¶
-
pk_url_kwarg= 'character'¶
-
success_url= '/fiction-outlines/characters/'¶
-
template_name= 'fiction_outlines/character_delete.html'¶
-
-
class
fiction_outlines.views.CharacterDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewGeneric view for character details.
-
context_object_name= 'character'¶
-
model¶ alias of
fiction_outlines.models.Character
-
permission_required= 'fiction_outlines.view_character'¶
-
pk_url_kwarg= 'character'¶
-
template_name= 'fiction_outlines/character_detail.html'¶
-
-
class
fiction_outlines.views.CharacterInstanceCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.CreateViewGeneric create view for a character instance.
-
form_class¶
-
model¶
-
outline= None¶
-
permission_required= None¶
-
success_url= None¶
-
template_name= 'fiction_outlines/character_instance_create.html'¶
-
-
class
fiction_outlines.views.CharacterInstanceDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.DeleteViewGeneric view for deleting character instances.
-
context_object_name= 'character_instance'¶
-
model¶
-
permission_required= 'fiction_outlines.delete_character_instance'¶
-
pk_url_kwarg= 'instance'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/character_instance_delete.html'¶
-
-
class
fiction_outlines.views.CharacterInstanceDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewGeneric detail view for character instance.
-
context_object_name= 'character_instance'¶
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
model¶
-
permission_required= 'fiction_outlines.view_character'¶
-
pk_url_kwarg= 'instance'¶
-
template_name= 'fiction_outlines/character_instance_detail.html'¶
-
-
class
fiction_outlines.views.CharacterInstanceListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.list.ListViewGeneric view for seeing a list of all character instances for a particular character.
-
context_object_name= 'character_instance_list'¶
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
get_queryset()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
model¶
-
permission_required= 'fiction_outlines.view_character'¶
-
template_name= 'fiction_outlines/character_instance_list.html'¶
-
-
class
fiction_outlines.views.CharacterInstanceUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,django.views.generic.edit.UpdateViewGeneric view for updating a character instance.
-
context_object_name= 'character_instance'¶
-
form_class¶
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
model¶
-
permission_required= 'fiction_outlines.edit_character'¶
-
pk_url_kwarg= 'instance'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/character_instance_update.html'¶
-
-
class
fiction_outlines.views.CharacterListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.list.ListViewGeneric view for viewing character list.
-
context_object_name= 'character_list'¶
-
get_queryset()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
model¶ alias of
fiction_outlines.models.Character
-
template_name= 'fiction_outlines/character_list.html'¶
-
-
class
fiction_outlines.views.CharacterUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.UpdateViewGeneric update view for character.
-
context_object_name= 'character'¶
-
form_class¶ alias of
fiction_outlines.forms.CharacterForm
-
model¶ alias of
fiction_outlines.models.Character
-
permission_required= 'fiction_outlines.edit_character'¶
-
pk_url_kwarg= 'character'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/character_update.html'¶
-
-
class
fiction_outlines.views.LocationCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.edit.CreateViewGeneric view for creating locations
-
form_class¶ alias of
fiction_outlines.forms.LocationForm
-
model¶ alias of
fiction_outlines.models.Location
-
success_url= None¶
-
template_name= 'fiction_outlines/location_create.html'¶
-
-
class
fiction_outlines.views.LocationDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.DeleteViewGeneric view for deleting locations.
-
context_object_name= 'location'¶
-
model¶ alias of
fiction_outlines.models.Location
-
permission_required= 'fiction_outlines.delete_location'¶
-
pk_url_kwarg= 'location'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/location_delete.html'¶
-
-
class
fiction_outlines.views.LocationDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewGeneric view for location details.
-
context_object_name= 'location'¶
-
model¶ alias of
fiction_outlines.models.Location
-
permission_required= 'fiction_outlines.view_location'¶
-
pk_url_kwarg= 'location'¶
-
template_name= 'fiction_outlines/location_detail.html'¶
-
-
class
fiction_outlines.views.LocationInstanceCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.CreateViewGeneric view for creating a location instance on a outline.
-
form_class¶
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
model¶
-
permission_required= 'fiction_outlines.edit_location'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/location_instance_create.html'¶
-
-
class
fiction_outlines.views.LocationInstanceDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.DeleteViewGeneric delete view for Location Instance.
-
context_object_name= 'location_instance'¶
-
model¶
-
permission_required= 'fiction_outlines.delete_location_instance'¶
-
pk_url_kwarg= 'instance'¶
-
select_releated= ['location', 'outline']¶
-
success_url= None¶
-
template_name= 'fiction_outlines/location_instance_delete.html'¶
-
-
class
fiction_outlines.views.LocationInstanceDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewGeneric view for a location instance detail view.
-
context_object_name= 'location_instance'¶
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
model¶
-
permission_required= 'fiction_outlines.view_location'¶
-
pk_url_kwarg= 'instance'¶
-
template_name= 'fiction_outlines/location_instance_detail.html'¶
-
-
class
fiction_outlines.views.LocationInstanceListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.list.ListViewGeneric view for looking at all location instances for a location.
-
context_object_name= 'location_instance_list'¶
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
get_queryset()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
model¶
-
permission_required= 'fiction_outlines.view_location'¶
-
template_name= 'fiction_outlines/location_instance_list.html'¶
-
-
class
fiction_outlines.views.LocationInstanceUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,django.views.generic.edit.UpdateViewGeneric view for updating a location instance. Not used since there are not details. But it’s here if you want to subclass LocationInstance and customize it.
-
context_object_name= 'location_instance'¶
-
form_class¶
-
model¶
-
permission_required= 'fiction_outlines.edit_location_instance'¶
-
pk_url_kwarg= 'instance'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/location_instance_update.html'¶
-
-
class
fiction_outlines.views.LocationListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.list.ListViewGeneric view for locations.
-
context_object_name= 'location_list'¶
-
get_queryset()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
model¶ alias of
fiction_outlines.models.Location
-
template_name= 'fiction_outlines/location_list.html'¶
-
-
class
fiction_outlines.views.LocationUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.UpdateViewGeneric view for updating locations.
-
context_object_name= 'location'¶
-
form_class¶ alias of
fiction_outlines.forms.LocationForm
-
model¶ alias of
fiction_outlines.models.Location
-
permission_required= 'fiction_outlines.edit_location'¶
-
pk_url_kwarg= 'location'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/location_update.html'¶
-
-
class
fiction_outlines.views.OutlineCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.edit.CreateViewGeneric view for creating initial outline.
-
form_class¶ alias of
fiction_outlines.forms.OutlineForm
-
model¶ alias of
fiction_outlines.models.Outline
-
success_url= None¶
-
template_name= 'fiction_outlines/outline_create.html'¶
-
-
class
fiction_outlines.views.OutlineDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.DeleteViewGeneric delete view for an outline.
-
context_object_name= 'outline'¶
-
model¶ alias of
fiction_outlines.models.Outline
-
permission_required= 'fiction_outlines.delete_outline'¶
-
pk_url_kwarg= 'outline'¶
-
success_url= '/fiction-outlines/outlines/'¶
-
template_name= 'fiction_outlines/outline_delete.html'¶
-
-
class
fiction_outlines.views.OutlineDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewGeneric view for Outline detail
-
context_object_name= 'outline'¶
-
model¶ alias of
fiction_outlines.models.Outline
-
permission_required= 'fiction_outlines.view_outline'¶
-
pk_url_kwarg= 'outline'¶
-
template_name= 'fiction_outlines/outline_detail.html'¶
-
-
class
fiction_outlines.views.OutlineExport(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewGeneric view to get an export of an outline record.
Takes a url kwarg of
outlineas the pk of thefiction_outlines.models.OutlineThe url kwarg offormatdetermines the type returned. Current supported formats areopml,json, ormd.-
context_object_name= 'outline'¶
-
default_format= 'json'¶
-
model¶ alias of
fiction_outlines.models.Outline
-
not_implemented(context, **response_kwargs)[source]¶ If DEBUG: raise NotImplemented Exception. If not, raise 404. :raises:`django.http.Http404` if production environment. :raises:`NotImplementedError` if
settings.DEBUGis True
-
permission_required= 'fiction_outlines.view_outline'¶
-
pk_url_kwarg= 'outline'¶
-
render_to_response(context, **response_kwargs)[source]¶ Compares requested format to supported formats and routes the response.
Attribute switcher: A dictionary of format types and their respective response methods.
-
return_json_response(context, **request_kwargs)[source]¶ Returns detailed outline structure as
django.http.JsonResponse.
-
return_md_response(context, **response_kwargs)[source]¶ Returns the outline as a single markdown file.
-
template_name= 'fiction_outlines/outline.opml'¶
-
-
class
fiction_outlines.views.OutlineListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.list.ListViewGeneric view for Outline Outline list
-
context_object_name= 'outline_list'¶
-
get_queryset()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
model¶ alias of
fiction_outlines.models.Outline
-
template_name= 'fiction_outlines/outline_list.html'¶
-
-
class
fiction_outlines.views.OutlineUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.UpdateViewGeneric update view for outline details.
-
context_object_name= 'outline'¶
-
form_class¶ alias of
fiction_outlines.forms.OutlineForm
-
model¶ alias of
fiction_outlines.models.Outline
-
permission_required= 'fiction_outlines.edit_outline'¶
-
pk_url_kwarg= 'outline'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/outline_update.html'¶
-
-
class
fiction_outlines.views.SeriesCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.edit.CreateViewGeneric view for creating series object.
-
fields= ['title', 'description', 'tags']¶
-
model¶ alias of
fiction_outlines.models.Series
-
success_url= None¶
-
template_name= 'fiction_outlines/series_create.html'¶
-
-
class
fiction_outlines.views.SeriesDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.DeleteViewGeneric view for deleting a series.
-
context_object_name= 'series'¶
-
model¶ alias of
fiction_outlines.models.Series
-
permission_required= 'fiction_outlines.delete_series'¶
-
pk_url_kwarg= 'series'¶
-
success_url= '/fiction-outlines/series/'¶
-
template_name= 'fiction_outlines/series_delete.html'¶
-
-
class
fiction_outlines.views.SeriesDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewGeneric view to see series details.
-
context_object_name= 'series'¶
-
model¶ alias of
fiction_outlines.models.Series
-
permission_required= 'fiction_outlines.view_series'¶
-
pk_url_kwarg= 'series'¶
-
template_name= 'fiction_outlines/series_detail.html'¶
-
-
class
fiction_outlines.views.SeriesListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.list.ListViewGeneric view for viewing a list of series objects.
-
context_object_name= 'series_list'¶
-
get_queryset()[source]¶ Return the list of items for this view.
The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.
-
model¶ alias of
fiction_outlines.models.Series
-
template_name= 'fiction_outlines/series_list.html'¶
-
-
class
fiction_outlines.views.SeriesUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.UpdateViewGeneric view for updating a series object.
-
context_object_name= 'series'¶
-
fields= ['title', 'description', 'tags']¶
-
model¶ alias of
fiction_outlines.models.Series
-
permission_required= 'fiction_outlines.edit_series'¶
-
pk_url_kwarg= 'series'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/series_update.html'¶
-
-
class
fiction_outlines.views.StoryNodeCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,django.views.generic.edit.CreateViewCreation view for a story node. Assumes the target and pos have been passed as kwargs.
-
form_class¶ alias of
fiction_outlines.forms.StoryNodeForm
-
get_permission_object()[source]¶ Override this method to provide the object to check for permission against. By default uses
self.get_object()as provided bySingleObjectMixin. Returns None if there’s noget_objectmethod.
-
model¶
-
permission_required= 'fiction_outlines.edit_outline'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/storynode_create.html'¶
-
-
class
fiction_outlines.views.StoryNodeDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.DeleteViewGenric view for deleting a story node.
-
context_object_name= 'storynode'¶
-
model¶
-
permission_required= 'fiction_outlines.delete_story_node'¶
-
pk_url_kwarg= 'storynode'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/storynode_delete.html'¶
-
-
class
fiction_outlines.views.StoryNodeDetailView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.detail.DetailViewView for looking at the details of an atomic story node as opposed to the whole tree.
-
context_object_name= 'storynode'¶
-
model¶
-
permission_required= 'fiction_outlines.view_story_node'¶
-
pk_url_kwarg= 'storynode'¶
-
template_name= 'fiction_outlines/storynode_detail.html'¶
-
-
class
fiction_outlines.views.StoryNodeMoveView(**kwargs)[source]¶ Bases:
fiction_outlines.views.StoryNodeUpdateViewView for executing a move method on an arcnode.
-
form_class¶ alias of
django.forms.widgets.StoryElementNodeForm
-
success_url= None¶
-
template_name= 'fiction_outlines/storynode_move.html'¶
-
-
class
fiction_outlines.views.StoryNodeUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,rules.contrib.views.PermissionRequiredMixin,braces.views._queries.SelectRelatedMixin,braces.views._queries.PrefetchRelatedMixin,django.views.generic.edit.UpdateViewView for doing basic updates to a story node, but not regarding its position in the tree.
-
context_object_name= 'storynode'¶
-
form_class¶ alias of
fiction_outlines.forms.StoryNodeForm
-
model¶
-
permission_required= 'fiction_outlines.edit_story_node'¶
-
pk_url_kwarg= 'storynode'¶
-
success_url= None¶
-
template_name= 'fiction_outlines/storynode_update.html'¶
-
Module contents¶
fiction_outlines is a reusable Django app for managing manuscript outlines.