web.pluginmanager.plugins.model

Package web :: Package pluginmanager :: Package plugins :: Module model |
[hide private]
[frames] | no frames]

# Source Code for Module web.pluginmanager.plugins.model

     1  from db import Base
     2  from sqlalchemy import Column, Unicode, Boolean
     3
     4  metadata = Base.metadata
     5
     6 -class Plugin(Base):
     7      __tablename__ = 'plugin'
     8
     9      name = Column(Unicode(256), primary_key=True)
    10      human_name = Column(Unicode(256))
    11      version = Column(Unicode(256))
    12      enabled = Column(Boolean)
    13
    14 -    def __init__(self, plugin):
    15          self.name = plugin.name
    16          self.human_name = plugin.human_name
    17          self.version = plugin.version.__str__()
    18          self.enabled = plugin.enabled
    19
    20 -    def update(self, plugin):
    21          self.__init__(plugin)
    22