Package coprs :: Module models :: Class Action
[hide private]
[frames] | no frames]

Class Action

source code


Representation of a custom action that needs backends cooperation/admin attention/...

Nested Classes [hide private]

Inherited from flask_sqlalchemy.Model: query_class

Instance Methods [hide private]
 
__str__(self)
str(x)
source code
 
__unicode__(self) source code
 
__init__(self, **kwargs)
A simple constructor that allows initialization from kwargs.
source code

Inherited from unreachable.Model: query

Inherited from helpers.Serializer: to_dict

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  id = db.Column(db.Integer, primary_key= True)
  action_type = db.Column(db.Integer, nullable= False)
  object_type = db.Column(db.String(20))
  object_id = db.Column(db.Integer)
  old_value = db.Column(db.String(255))
  new_value = db.Column(db.String(255))
  data = db.Column(db.Text)
  result = db.Column(db.Integer, default= helpers.BackendResultE...
  message = db.Column(db.Text)
  created_on = db.Column(db.Integer)
  ended_on = db.Column(db.Integer)
  __mapper__ = <Mapper at 0x3e75790; Action>
  __table__ = Table('action', MetaData(bind=None), Column('id', ...
  __tablename__ = 'action'
  _sa_class_manager = <ClassManager of <class 'coprs.models.Acti...

Inherited from unreachable.Model: metadata

Inherited from unreachable.Model (private): _decl_class_registry

Properties [hide private]

Inherited from helpers.Serializer: serializable_attributes

Inherited from object: __class__

Method Details [hide private]

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__init__(self, **kwargs)
(Constructor)

source code 

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in ``kwargs``.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Overrides: object.__init__

Class Variable Details [hide private]

result

Value:
db.Column(db.Integer, default= helpers.BackendResultEnum("waiting"))

__table__

Value:
Table('action', MetaData(bind=None), Column('id', Integer(), table=<ac\
tion>, primary_key=True, nullable=False), Column('action_type', Intege\
r(), table=<action>, nullable=False), Column('object_type', String(len\
gth=20), table=<action>), Column('object_id', Integer(), table=<action\
>), Column('old_value', String(length=255), table=<action>), Column('n\
ew_value', String(length=255), table=<action>), Column('data', Text(),\
 table=<action>), Column('result', Integer(), table=<action>, default=\
ColumnDefault(0)), Column('message', Text(), table=<action>), Column('\
...

_sa_class_manager

Value:
<ClassManager of <class 'coprs.models.Action'> at 3fc3bf0>