assembl.models.publication_states module¶
Defining publication states for ideas and posts.
-
class
assembl.models.publication_states.
PublicationFlow
(**kwargs)[source]¶ Bases:
assembl.models.NamedClassMixin
,sqlalchemy.ext.declarative.api.Base
A state automaton for publication states and transitions
-
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.publication_states.
PublicationState
(**kwargs)[source]¶ Bases:
assembl.models.ContextualNamedClassMixin
,sqlalchemy.ext.declarative.api.Base
A publication state
-
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.publication_states.
PublicationTransition
(**kwargs)[source]¶ Bases:
assembl.models.ContextualNamedClassMixin
,sqlalchemy.ext.declarative.api.Base
A publication transition
-
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.publication_states.
StateDiscussionPermission
(**kwargs)[source]¶ Bases:
assembl.models.DiscussionBoundBase
Which permissions are given to which roles for a given publication state.