assembl.models package¶
Submodules¶
- assembl.models.action module
- assembl.models.annotation module
- assembl.models.announcement module
- assembl.models.attachment module
- assembl.models.auth module
- assembl.models.discussion module
- assembl.models.edgesense_drupal module
- assembl.models.facebook_integration module
- assembl.models.feed_parsing module
- assembl.models.generic module
- assembl.models.hypothesis_source module
- assembl.models.idea module
- assembl.models.idea_content_link module
- assembl.models.idea_graph_view module
- assembl.models.idea_source module
- assembl.models.import_record_source module
- assembl.models.import_records module
- assembl.models.langstrings module
- assembl.models.mail module
- assembl.models.notification module
- assembl.models.path_utils module
- assembl.models.permissions module
- assembl.models.post module
- assembl.models.preferences module
- assembl.models.publication_states module
- assembl.models.social_auth module
- assembl.models.timeline module
- assembl.models.uriref module
- assembl.models.user_key_values module
- assembl.models.vocabulary module
- assembl.models.votes module
- assembl.models.widgets module
Module contents¶
The SQLAlchemy models of IdeaLoom.
The base class of all models is Base, derived from assembl.lib.sqla.BaseOps
.
Here, we also define some other base-level classes, such as DiscussionBoundBase
and DiscussionBoundTombstone
.
-
class
assembl.models.
ContextualNamedClassMixin
[source]¶ Bases:
assembl.models.NamedClassMixin
A mix-in for models that have a unique name within a context
-
class
assembl.models.
DeclarativeAbstractMeta
(name, bases, namespace, **kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.DeclarativeMeta
,abc.ABCMeta
Allows to declare abstract SQLAlchemy classes
-
class
assembl.models.
DiscussionBoundBase
(**kwargs)[source]¶ Bases:
assembl.models.AbstractBase
Base class for models that are bound to a specific discussion.
These models will deleted if the discussion is deleted. They need to have a relationship to the discussion, but this relationship need not be direct. Subclasses need to define
get_discussion_id()
andget_discussion_conditions()
.-
abstract 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.
-
send_to_changes
(connection=None, operation=<CrudOperation.UPDATE: 0>, discussion_id=None, view_def='changes')[source]¶ Ask for this object to be sent on the changes websocket.
-
tombstone
()[source]¶ Return a
Tombstone
object.This object will be sent on the websocket and will express that this object has been deleted.
-
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.
-
abstract classmethod