assembl.models.idea_content_link module¶
Links between assembl.models.idea.Idea
and assembl.models.generic.Content
.
-
class
assembl.models.idea_content_link.
AnnotationSelector
(**kwargs)[source]¶
-
class
assembl.models.idea_content_link.
Extract
(**kwargs)[source]¶ Bases:
assembl.models.DiscussionBoundBase
,assembl.lib.history_mixin.OriginMixin
An extracted part of a Content. A quotation to be referenced by an Idea.
-
classmethod
base_conditions
(alias=None, alias_maker=None)[source]¶ Return a list of SQLA expressions that will filter out instances of this class
Mostly used to exclude archived versions; see
assembl.lib.history_mixin
The exclusion pattern is used by the traversal API, and by the RDF mapping.
-
classmethod
get_discussion_conditions
(discussion_id, alias_maker=None)[source]¶ Returns a list of SQLA expressions that constrain a query on this class to a given discussion.
-
populate_from_context
(context)[source]¶ If object created in this context, populate some relations from that context.
This is the magic fallback, ideally define the relationships you want populated explicitly in subclasses of this.
-
classmethod
restrict_to_owners_condition
(query, user_id, alias=None, alias_maker=None)[source]¶ filter query according to object owners
-
classmethod
-
class
assembl.models.idea_content_link.
IdeaContentLink
(**kwargs)[source]¶ Bases:
assembl.models.DiscussionBoundBase
,assembl.lib.history_mixin.OriginMixin
Abstract class representing a generic link between an idea and a Content (typically a Post)
-
classmethod
base_conditions
(alias=None, alias_maker=None)[source]¶ Return a list of SQLA expressions that will filter out instances of this class
Mostly used to exclude archived versions; see
assembl.lib.history_mixin
The exclusion pattern is used by the traversal API, and by the RDF mapping.
-
classmethod
-
class
assembl.models.idea_content_link.
IdeaContentNegativeLink
(**kwargs)[source]¶ Bases:
assembl.models.idea_content_link.IdeaContentLink
A negative link between an idea and a Content. Such links mean that a transitive context should be considered broken. Used for thread breaking
-
class
assembl.models.idea_content_link.
IdeaContentPositiveLink
(**kwargs)[source]¶ Bases:
assembl.models.idea_content_link.IdeaContentLink
A normal link between an idea and a Content. Such links should be traversed.
-
class
assembl.models.idea_content_link.
IdeaContentWidgetLink
(**kwargs)[source]¶ Bases:
assembl.models.idea_content_link.IdeaContentPositiveLink
A link between an idea and a Content limited to a widget view. Such links should be traversed.
-
class
assembl.models.idea_content_link.
IdeaExtractLink
(**kwargs)[source]¶ Bases:
assembl.models.idea_content_link.IdeaRelatedPostLink
A post that is relevant, to an idea through a harvested extract
-
class
assembl.models.idea_content_link.
IdeaRelatedPostLink
(**kwargs)[source]¶ Bases:
assembl.models.idea_content_link.IdeaContentPositiveLink
A post that is relevant, as a whole, to an idea, without having a specific extract harvested.
-
class
assembl.models.idea_content_link.
IdeaThreadContextBreakLink
(**kwargs)[source]¶ Bases:
assembl.models.idea_content_link.IdeaContentNegativeLink
Used for a Post the inherits an Idea from an ancester in the thread. It indicates that from this point on in the thread, this idea is no longer discussed.