Django Stories 1.0beta1 documentation

This Page

Models

Stories

class stories.models.Story(*args, **kwargs)

A newspaper or magazine type story or document that was possibly also printed in a periodical.

exception DoesNotExist
exception Story.MultipleObjectsReturned
Story.author

Easy way to get a combination of authors without having to worry which fields are set (author/one-off author)

Story.author_display

Presentation of the story author(s). Renders the template stories/author_display.html suppling it with the following context

  • instance - the story instance
  • authors - all the authors (authors.objects.all())
  • non_staff_author - text value that can be used in place of authors
Story.authors
Story.comments_frozen

Simplified way to get the comment status == frozen

Story.get_absolute_url(*moreargs, **morekwargs)
Story.get_comment_status_display(*moreargs, **morekwargs)
Story.get_next_by_modified_date(*moreargs, **morekwargs)
Story.get_origin_display(*moreargs, **morekwargs)
Story.get_previous_by_modified_date(*moreargs, **morekwargs)
Story.get_status_display(*moreargs, **morekwargs)
Story.objects = <django.db.models.manager.Manager object at 0x2c95d10>
Story.paragraphs

Return the story.body as paragraphs by finding all <p> tags

Story.print_page = (<django.db.models.fields.CharField>,)
Story.print_pub_date = (<django.db.models.fields.DateTimeField>,)
Story.print_section = (<django.db.models.fields.CharField>,)
Story.published = <stories.models.CurrentSitePublishedManager object at 0x2c95d50>
Story.site

Relations

class stories.relations.models.StoryRelation(*args, **kwargs)

Related story item

exception DoesNotExist
exception StoryRelation.MultipleObjectsReturned
StoryRelation.content_object

Provides a generic relation to any object through content-type/object-id fields.

StoryRelation.content_type
StoryRelation.objects = <stories.relations.models.StoryRelationManager object at 0x2f8ec50>
StoryRelation.story