assembl.models.action module¶
Records of actions taken by the platform users.
-
class
assembl.models.action.
Action
(**kwargs)[source]¶ Bases:
assembl.lib.history_mixin.TombstonableMixin
,assembl.lib.history_mixin.OriginMixin
,assembl.models.DiscussionBoundBase
An action that can be taken by an actor (a
auth.User
).Most actions are expressed in terms of actor-verb-target-time, with verbs including but not restricted to CRUD operations.
-
class
assembl.models.action.
ActionOnIdea
(**kwargs)[source]¶ Bases:
assembl.models.action.Action
An action that is taken on an idea. (Mixin)
-
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.
-
classmethod
-
class
assembl.models.action.
ActionOnPost
(**kwargs)[source]¶ Bases:
assembl.models.action.Action
An action whose target is a post. (Mixin)
-
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.
-
classmethod
-
class
assembl.models.action.
CollapsePost
(**kwargs)[source]¶ Bases:
assembl.models.action.UniqueActionOnPost
A collapse action on a post.
-
class
assembl.models.action.
ExpandPost
(**kwargs)[source]¶ Bases:
assembl.models.action.UniqueActionOnPost
An expansion action on a post.
-
class
assembl.models.action.
LikedPost
(**kwargs)[source]¶ Bases:
assembl.models.action.UniqueActionOnPost
A like action on a post.
-
class
assembl.models.action.
UniqueActionOnIdea
(**kwargs)[source]¶ Bases:
assembl.models.action.ActionOnIdea
An action that should be unique of its subclass for an idea, user pair
-
unique_query
()[source]¶ returns a couple (query, usable), with a sqla query for conflicting similar objects. usable is true if the query has to be enforced; sometimes it makes sense to return un-usable query that will be used to construct queries of subclasses. Note that when a duplicate is found, you’ll often want to expunge the original.
-
-
class
assembl.models.action.
UniqueActionOnPost
(**kwargs)[source]¶ Bases:
assembl.models.action.ActionOnPost
An action that should be unique of its subclass for a post, user pair
-
unique_query
()[source]¶ returns a couple (query, usable), with a sqla query for conflicting similar objects. usable is true if the query has to be enforced; sometimes it makes sense to return un-usable query that will be used to construct queries of subclasses. Note that when a duplicate is found, you’ll often want to expunge the original.
-
-
class
assembl.models.action.
ViewIdea
(**kwargs)[source]¶ Bases:
assembl.models.action.ActionOnIdea
A view action on an idea. (Not a status)
-
class
assembl.models.action.
ViewPost
(**kwargs)[source]¶ Bases:
assembl.models.action.UniqueActionOnPost
A view action on a post.