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

Class CoprPermission

source code


Association class for Copr<->Permission relation

Nested Classes [hide private]

Inherited from flask_sqlalchemy.Model: query_class

Instance Methods [hide private]
 
__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__, __str__, __subclasshook__

Class Variables [hide private]
  copr_builder = db.Column(db.SmallInteger, default= 0)
  copr_admin = db.Column(db.SmallInteger, default= 0)
  user_id = db.Column(db.Integer, db.ForeignKey("user.id"), prim...
  user = db.relationship("User", backref= db.backref("copr_permi...
  copr_id = db.Column(db.Integer, db.ForeignKey("copr.id"), prim...
  copr = db.relationship("Copr", backref= db.backref("copr_permi...
  __mapper__ = <Mapper at 0x7fee48f42090; CoprPermission>
  __table__ = Table('copr_permission', MetaData(bind=None), Colu...
  __tablename__ = 'copr_permission'
  _sa_class_manager = <ClassManager of <class 'coprs.models.Copr...

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]

__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]

user_id

Value:
db.Column(db.Integer, db.ForeignKey("user.id"), primary_key= True)

user

Value:
db.relationship("User", backref= db.backref("copr_permissions"))

copr_id

Value:
db.Column(db.Integer, db.ForeignKey("copr.id"), primary_key= True)

copr

Value:
db.relationship("Copr", backref= db.backref("copr_permissions"))

__table__

Value:
Table('copr_permission', MetaData(bind=None), Column('copr_builder', S\
mallInteger(), table=<copr_permission>, default=ColumnDefault(0)), Col\
umn('copr_admin', SmallInteger(), table=<copr_permission>, default=Col\
umnDefault(0)), Column('user_id', Integer(), ForeignKey('user.id'), ta\
ble=<copr_permission>, primary_key=True, nullable=False), Column('copr\
_id', Integer(), ForeignKey('copr.id'), table=<copr_permission>, prima\
ry_key=True, nullable=False), schema=None)

_sa_class_manager

Value:
<ClassManager of <class 'coprs.models.CoprPermission'> at 7fee48fc2ab8\
>