示例#1
0
 def configure(self,config={},gpgconfig=gpg_defaults,apiconfig=api_defaults,
     smtpconfig=smtp_defaults):
     from ekklesia.backends import APIConfig, spec_defaults
     super(InvitationDatabase,self).configure(config=config,gpgconfig=gpgconfig)
     api = api_defaults.copy()
     api.update(apiconfig)
     self.invite_api = APIConfig(**api)
     self.smtpconfig = smtpconfig
     self.member_class = None # integrated with Member table
     assert self.version[0]<=1, 'invalid version'
     defaults = spec_defaults(invitations_spec)['invitations']
     for key in defaults.keys():
         setattr(self,key,config.get(key,defaults[key]))
     return self
示例#2
0
 def configure(self,config={},gpgconfig=gpg_defaults,apiconfig=api_defaults,
     smtpconfig=smtp_defaults):
     from ekklesia.backends import APIConfig, spec_defaults
     super(MemberDatabase,self).configure(config=config,gpgconfig=gpgconfig)
     api = api_defaults.copy()
     api.update(apiconfig)
     self.member_api = APIConfig(**api)
     self.smtpconfig = smtpconfig
     defaults = spec_defaults(members_spec)['members']
     for key in defaults.keys():
         setattr(self,key,config.get(key,defaults[key]))
     if not self.member_sync: self.member_sync = self.member_import
     assert self.department_spec != 'number' or 'id' in self.department_import, "id field required"
     return self
示例#3
0
 def __init__(self,
              config={},
              gpgconfig=gpg_defaults,
              apiconfig=api_defaults,
              smtpconfig=smtp_defaults,
              logger=None):
     super(InvitationDatabase, self).__init__(config, gpgconfig, logger)
     api = api_defaults.copy()
     api.update(apiconfig)
     self.invite_api = APIConfig(**api)
     self.smtpconfig = smtpconfig
     self.member_class = None  # integrated with Member table
     assert self.version[0] <= 1, 'invalid version'
     defaults = spec_defaults(invitations_spec)['invitations']
     for key in defaults.keys():
         setattr(self, key, config.get(key, defaults[key]))
示例#4
0
 def __init__(self,
              config={},
              gpgconfig=gpg_defaults,
              apiconfig=api_defaults,
              smtpconfig=smtp_defaults,
              logger=None):
     super(MemberDatabase, self).__init__(config, gpgconfig, logger)
     api = api_defaults.copy()
     api.update(apiconfig)
     self.member_api = APIConfig(**api)
     self.smtpconfig = smtpconfig
     assert self.version[0] <= 1, 'invalid version'
     defaults = spec_defaults(members_spec)['members']
     for key in defaults.keys():
         setattr(self, key, config.get(key, defaults[key]))
     if not self.member_sync: self.member_sync = self.member_import
     assert self.department_spec != 'number' or 'id' in self.department_import, "id field required"
示例#5
0
 def configure(self,
               config={},
               gpgconfig=gpg_defaults,
               apiconfig=api_defaults,
               smtpconfig=smtp_defaults):
     from ekklesia.backends import APIConfig, spec_defaults
     super(MemberDatabase, self).configure(config=config,
                                           gpgconfig=gpgconfig)
     api = api_defaults.copy()
     api.update(apiconfig)
     self.member_api = APIConfig(**api)
     self.smtpconfig = smtpconfig
     defaults = spec_defaults(members_spec)['members']
     for key in defaults.keys():
         setattr(self, key, config.get(key, defaults[key]))
     if not self.member_sync: self.member_sync = self.member_import
     assert self.department_spec != 'number' or 'id' in self.department_import, "id field required"
     return self