fiction_outlines package

Submodules

fiction_outlines.admin module

class fiction_outlines.admin.ArcAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media
class fiction_outlines.admin.ArcElementNodeAdmin(model, admin_site)[source]

Bases: treebeard.admin.TreeAdmin

form

alias of ArcElementNodeForm

media
class fiction_outlines.admin.CharacterAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media
class fiction_outlines.admin.CharacterInstanceAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media
class fiction_outlines.admin.LocationAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media
class fiction_outlines.admin.LocationInstanceAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media
class fiction_outlines.admin.OutlineAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media
class fiction_outlines.admin.SeriesAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media
class fiction_outlines.admin.StoryElementNodeAdmin(model, admin_site)[source]

Bases: treebeard.admin.TreeAdmin

form

alias of StoryElementNodeForm

media

fiction_outlines.apps module

class fiction_outlines.apps.FictionOutlinesConfig(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

name = 'fiction_outlines'
ready()[source]
verbose_name = 'Fiction Outlines'

fiction_outlines.models module

class fiction_outlines.models.Arc(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel

A 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.children is a ReverseManyToOneDescriptor instance.

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_absolute_url()[source]
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=<model_utils.fields.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=<model_utils.fields.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.parent is a ForwardManyToOneDescriptor instance.

outline_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

refresh_from_db(*args, **kwargs)[source]
validate_first_element()[source]

Ensures that the first node for the direct decendents of root is the hook.

validate_generations()[source]

Make sure that the descendent depth is valid.

validate_last_element()[source]

Ensures that the last element of the arc is the resolution.

validate_milestones()[source]

Reviews the arc element tree to ensure that milestones appear in the right order.

class fiction_outlines.models.ArcElementNode(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel, treebeard.mp_tree.MP_Node

Tree nodes for the arc elements.

Parameters:
  • created (AutoCreatedField) – Created
  • modified (AutoLastModifiedField) – Modified
  • path (CharField) – Path
  • depth (PositiveIntegerField) – Depth
  • numchild (PositiveIntegerField) – Numchild
  • 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.parent is a ForwardManyToOneDescriptor instance.

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

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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_absolute_url()[source]
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=<model_utils.fields.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=<model_utils.fields.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.parent is a ForwardManyToOneDescriptor instance.

story_element_node_id

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.ArcGenerationError[source]

Bases: fiction_outlines.models.ArcIntegrityError

Exception for when a non-milestone node is placed at an invalid level of descendency.

exception fiction_outlines.models.ArcIntegrityError[source]

Bases: django.db.utils.IntegrityError

Generic exception for Arc structural warnings.

class fiction_outlines.models.Character(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel

Reusable 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.children is a ReverseManyToOneDescriptor instance.

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_absolute_url()[source]
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<model_utils.fields.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=<model_utils.fields.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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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.comments is a ReverseGenericManyToOneDescriptor instance.

tags = <taggit.managers._TaggableManager object>
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.parent is a ForwardManyToOneDescriptor instance.

user_id

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.CharacterInstance(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel

An 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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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.parent is a ForwardManyToOneDescriptor instance.

character_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_absolute_url()[source]
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<model_utils.fields.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=<model_utils.fields.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.parent is a ForwardManyToOneDescriptor instance.

outline_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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.ArcIntegrityError

Exception for when a non-milestone element is placed in an invalid sequence.

class fiction_outlines.models.Location(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel

Reusable 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_absolute_url()[source]
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<model_utils.fields.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=<model_utils.fields.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.children is a ReverseManyToOneDescriptor instance.

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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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.comments is a ReverseGenericManyToOneDescriptor instance.

tags = <taggit.managers._TaggableManager object>
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.parent is a ForwardManyToOneDescriptor instance.

user_id

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.LocationInstance(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel

An 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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_absolute_url()[source]
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<model_utils.fields.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=<model_utils.fields.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.parent is a ForwardManyToOneDescriptor instance.

location_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>
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.parent is a ForwardManyToOneDescriptor instance.

outline_id

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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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.ArcIntegrityError

Exception 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.ArcIntegrityError

Exception for when milestone arc elements violate their defined sequence rules.

class fiction_outlines.models.Outline(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel

The 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.children is a ReverseManyToOneDescriptor instance.

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.children is a ReverseManyToOneDescriptor instance.

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_absolute_url()[source]
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<model_utils.fields.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=<model_utils.fields.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.children is a ReverseManyToOneDescriptor instance.

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]
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.parent is a ForwardManyToOneDescriptor instance.

series_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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.children is a ReverseManyToOneDescriptor instance.

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.comments is a ReverseGenericManyToOneDescriptor instance.

tags = <taggit.managers._TaggableManager object>
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.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

validate_nesting()[source]

Reviews the story tree and validates associated arc elements are nested appropriately. Returns a dict of errors.

class fiction_outlines.models.Series(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel

Container 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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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_absolute_url()[source]
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<model_utils.fields.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=<model_utils.fields.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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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.children is a ReverseManyToOneDescriptor instance.

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.comments is a ReverseGenericManyToOneDescriptor instance.

tags = <taggit.managers._TaggableManager object>
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.parent is a ForwardManyToOneDescriptor instance.

user_id

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.StoryElementNode(*args, **kwargs)[source]

Bases: model_utils.models.TimeStampedModel, treebeard.mp_tree.MP_Node

Tree nodes for the overall outline of the story.

Parameters:
  • created (AutoCreatedField) – Created
  • modified (AutoLastModifiedField) – Modified
  • path (CharField) – Path
  • depth (PositiveIntegerField) – Depth
  • numchild (PositiveIntegerField) – Numchild
  • 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.children is a ReverseManyToOneDescriptor instance.

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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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_absolute_url()[source]
get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<model_utils.fields.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=<model_utils.fields.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.parent is a ForwardManyToOneDescriptor instance.

outline_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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.UUIDCharacterTag(*args, **kwargs)[source]

Bases: taggit.models.GenericUUIDTaggedItemBase, taggit.models.TaggedItemBase

Character 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_type and object_id fields.

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.parent is a ForwardManyToOneDescriptor instance.

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.parent is a ForwardManyToOneDescriptor instance.

class fiction_outlines.models.UUIDLocationTag(*args, **kwargs)[source]

Bases: taggit.models.GenericUUIDTaggedItemBase, taggit.models.TaggedItemBase

Location 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_type and object_id fields.

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.parent is a ForwardManyToOneDescriptor instance.

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.parent is a ForwardManyToOneDescriptor instance.

class fiction_outlines.models.UUIDOutlineTag(*args, **kwargs)[source]

Bases: taggit.models.GenericUUIDTaggedItemBase, taggit.models.TaggedItemBase

Outline 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_type and object_id fields.

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.parent is a ForwardManyToOneDescriptor instance.

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.parent is a ForwardManyToOneDescriptor instance.

fiction_outlines.receivers module

Recieving methods for signals go here.

fiction_outlines.receivers.arc_node_edit_add_missing_characters_and_locations_to_related_story_node(sender, instance, action, reverse, pk_set, *args, **kwargs)[source]

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]

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.receivers.validate_location_for_story_element(sender, instance, action, reverse, pk_set, *args, **kwargs)[source]

Validates that location is from same outline as story node.

fiction_outlines.receivers.validate_location_instance_valid_for_arc(sender, instance, action, reverse, pk_set, *args, **kwargs)[source]

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

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.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.CreateView

Generic view for creating an arc.

dispatch(request, *args, **kwargs)[source]
fields = ['name', 'mace_type']
form_valid(form)[source]
get_context_data(**kwargs)[source]
get_permission_object()[source]
get_success_url()[source]
model

alias of 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.DeleteView

Generic view for deleting an arc

context_object_name = 'arc'
dispatch(request, *args, **kwargs)[source]
get_success_url()[source]
model

alias of 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.DetailView

Generic view for arc details.

context_object_name = 'arc'
dispatch(request, *args, **kwargs)[source]
get_context_data(**kwargs)[source]
model

alias of 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.ListView

Generic list view for arcs in a outline

context_object_name = 'arc_list'
dispatch(request, *args, **kwargs)[source]
get_context_data(**kwargs)[source]
get_permission_object()[source]
get_queryset()[source]
model

alias of 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.CreateView

Create view for an arc node. Assumes that the target position has already been passed to it via kwargs.

dispatch(request, *args, **kwargs)[source]
form_class

alias of ArcNodeForm

form_valid(form)[source]
get_form_kwargs()[source]
get_permission_object()[source]
get_success_url()[source]
model

alias of ArcElementNode

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.DeleteView

View for deleting an arc node.

context_object_name = 'arcnode'
delete(request, *args, **kwargs)[source]
dispatch(request, *args, **kwargs)[source]
get_success_url()[source]
model

alias of ArcElementNode

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.DetailView

View for looking at the details of an atomic node as opposed to the whole tree.

context_object_name = 'arcnode'
model

alias of ArcElementNode

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.UpdateView

View for executing a move method on an arcnode.

context_object_name = 'arcnode'
form_class

alias of ArcElementNodeForm

form_valid(form)[source]
get_form_kwargs()[source]
get_success_url()[source]
model

alias of ArcElementNode

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.UpdateView

View for editing details of an arc node (but not it’s tree position).

context_object_name = 'arcnode'
form_class

alias of ArcNodeForm

form_valid(form)[source]
get_form_kwargs()[source]
get_success_url()[source]
model

alias of ArcElementNode

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.UpdateView

Generic view for updating arc details

context_object_name = 'arc'
fields = ['name', 'mace_type']
get_success_url()[source]
model

alias of 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.CreateView

Generic view for creating a character.

form_class

alias of CharacterForm

form_valid(form)[source]
get_form_kwargs()[source]
get_success_url()[source]
model

alias of 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.DeleteView

Generic view for deleting a character.

context_object_name = 'character'
model

alias of 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.DetailView

Generic view for character details.

context_object_name = 'character'
model

alias of 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.CreateView

Generic create view for a character instance.

dispatch(request, *args, **kwargs)[source]
form_class

alias of CharacterInstanceForm

form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_success_url()[source]
has_permission()[source]
model

alias of CharacterInstance

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.DeleteView

Generic view for deleting character instances.

context_object_name = 'character_instance'
dispatch(request, *args, **kwargs)[source]
get_success_url()[source]
model

alias of CharacterInstance

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.DetailView

Generic detail view for character instance.

context_object_name = 'character_instance'
dispatch(request, *args, **kwargs)[source]
get_permission_object()[source]
model

alias of CharacterInstance

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.ListView

Generic view for seeing a list of all character instances for a particular character.

context_object_name = 'character_instance_list'
dispatch(request, *args, **kwargs)[source]
get_context_data(**kwargs)[source]
get_permission_object()[source]
get_queryset()[source]
model

alias of CharacterInstance

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.UpdateView

Generic view for updating a character instance.

context_object_name = 'character_instance'
dispatch(request, *args, **kwargs)[source]
form_class

alias of CharacterInstanceForm

form_valid(form)[source]
get_form_kwargs()[source]
get_permission_object()[source]
get_success_url()[source]
model

alias of CharacterInstance

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.ListView

Generic view for viewing character list.

context_object_name = 'character_list'
get_queryset()[source]
model

alias of 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.UpdateView

Generic update view for character.

context_object_name = 'character'
form_class

alias of CharacterForm

get_form_kwargs()[source]
get_success_url()[source]
model

alias of 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.CreateView

Generic view for creating locations

form_class

alias of LocationForm

form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_success_url()[source]
model

alias of 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.DeleteView

Generic view for deleting locations.

context_object_name = 'location'
get_success_url()[source]
model

alias of 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.DetailView

Generic view for location details.

context_object_name = 'location'
model

alias of 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.CreateView

Generic view for creating a location instance on a outline.

dispatch(request, *args, **kwargs)[source]
form_class

alias of LocationInstanceForm

form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_permission_object()[source]
get_success_url()[source]
model

alias of LocationInstance

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.DeleteView

Generic delete view for Location Instance.

context_object_name = 'location_instance'
dispatch(request, *args, **kwargs)[source]
get_success_url()[source]
model

alias of LocationInstance

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.DetailView

Generic view for a location instance detail view.

context_object_name = 'location_instance'
dispatch(request, *args, **kwargs)[source]
get_permission_object()[source]
model

alias of LocationInstance

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.ListView

Generic view for looking at all location instances for a location.

context_object_name = 'location_instance_list'
dispatch(request, *args, **kwargs)[source]
get_context_data(**kwargs)[source]
get_permission_object()[source]
get_queryset()[source]
model

alias of LocationInstance

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.UpdateView

Generic 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'
dispatch(request, *args, **kwargs)[source]
form_class

alias of LocationInstanceForm

form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_success_url()[source]
model

alias of LocationInstance

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.ListView

Generic view for locations.

context_object_name = 'location_list'
get_queryset()[source]
model

alias of 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.UpdateView

Generic view for updating locations.

context_object_name = 'location'
form_class

alias of LocationForm

get_form_kwargs()[source]
get_success_url()[source]
model

alias of 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.CreateView

Generic view for creating initial outline.

form_class

alias of OutlineForm

form_valid(form)[source]
get_form_kwargs()[source]
get_success_url()[source]
model

alias of 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.DeleteView

Generic delete view for an outline.

context_object_name = 'outline'
model

alias of 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.DetailView

Generic view for Outline detail

context_object_name = 'outline'
model

alias of 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.DetailView

Generic view to get an export of an outline record.

Takes a url kwarg of outline as the pk of the fiction_outlines.models.Outline The url kwarg of format determines the type returned. Current supported formats are opml, json, or md.

context_object_name = 'outline'
default_format = 'json'
dispatch(request, *args, **kwargs)[source]
get_context_data(**kwargs)[source]
model

alias of 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.DEBUG is 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.

return_opml_response(context, **response_kwargs)[source]

Returns export data as an opml 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.ListView

Generic view for Outline Outline list

context_object_name = 'outline_list'
get_queryset()[source]
model

alias of 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.UpdateView

Generic update view for outline details.

context_object_name = 'outline'
form_class

alias of OutlineForm

get_form_kwargs()[source]
get_success_url()[source]
model

alias of 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.CreateView

Generic view for creating series object.

fields = ['title', 'description', 'tags']
form_valid(form)[source]

Override to ensure we can add the user to the record.

get_success_url()[source]
model

alias of 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.DeleteView

Generic view for deleting a series.

context_object_name = 'series'
model

alias of 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.DetailView

Generic view to see series details.

context_object_name = 'series'
model

alias of 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.ListView

Generic view for viewing a list of series objects.

context_object_name = 'series_list'
get_queryset()[source]
model

alias of 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.UpdateView

Generic view for updating a series object.

context_object_name = 'series'
fields = ['title', 'description', 'tags']
get_success_url()[source]
model

alias of 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.CreateView

Creation view for a story node. Assumes the target and pos have been passed as kwargs.

dispatch(request, *args, **kwargs)[source]
form_class

alias of StoryNodeForm

form_valid(form)[source]
get_form_kwargs()[source]
get_permission_object()[source]
get_success_url()[source]
model

alias of StoryElementNode

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.DeleteView

Genric view for deleting a story node.

context_object_name = 'storynode'
dispatch(request, *args, **kwargs)[source]
get_success_url()[source]
model

alias of StoryElementNode

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.DetailView

View for looking at the details of an atomic story node as opposed to the whole tree.

context_object_name = 'storynode'
model

alias of StoryElementNode

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.StoryNodeUpdateView

View for executing a move method on an arcnode.

form_class

alias of StoryElementNodeForm

form_valid(form)[source]
get_form_kwargs()[source]
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.UpdateView

View for doing basic updates to a story node, but not regarding its position in the tree.

context_object_name = 'storynode'
form_class

alias of StoryNodeForm

form_valid(form)[source]
get_form_kwargs()[source]
get_success_url()[source]
model

alias of StoryElementNode

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.