コード例 #1
0
    def __init__(self, password=None, **kwargs):
        Principal.__init__(self)
        UserMixin.__init__(self)
        db.Model.__init__(self, **kwargs)

        if self.can_login and password is not None:
            self.set_password(password)
コード例 #2
0
ファイル: subjects.py プロジェクト: debon/abilian-core
  def __init__(self, password=None, **kwargs):
    Principal.__init__(self)
    UserMixin.__init__(self)
    db.Model.__init__(self, **kwargs)

    if self.can_login and password is not None:
      self.set_password(password)
コード例 #3
0
ファイル: User.py プロジェクト: Daniel-Bu/w4111-project1
 def __init__(self, email='', password='', name=''):
     UserMixin.__init__(self)
     self.email = email
     self.name = name
     self.password = password
     self.valid = False
     self.id = ''  # Extra id field for Flask-login requirement
コード例 #4
0
ファイル: models.py プロジェクト: gorel/dli-reports
 def __init__(self, name, email, password, location, department):
     """Initialize a User model"""
     UserMixin.__init__(self)
     self.name = name
     self.email = email
     self.password = generate_password_hash(password)
     self.location = location
     self.department = department
     self.is_admin = False
コード例 #5
0
ファイル: models.py プロジェクト: gorel/dli-reports
 def __init__(self, name, email, password, location, department):
     """Initialize a User model"""
     UserMixin.__init__(self)
     self.name = name
     self.email = email
     self.password = generate_password_hash(password)
     self.location = location
     self.department = department
     self.is_admin = False
コード例 #6
0
 def __init__(self, dic=None):
     UserMixin.__init__(self)
     self.curr_order = {}
     if dic is not None:
         self.chef_id = dic['chef_id']
         self.chef_service_year = dic['chef_service_year']
         self.chef_name = dic['chef_name']
         self.chef_rank = dic['chef_rank']
         self.hall_id = dic['hall_id']
コード例 #7
0
    def __init__(self, db_user):
        """Crée l’objet à partir de la base de donnée

        :db_user: Objet User de la base de donnée

        """
        UserMixin.__init__(self)

        self._db_user = db_user
        self.id = db_user.id
コード例 #8
0
 def __init__(self, dic=None):
     UserMixin.__init__(self)
     self.curr_order = {}
     if dic is not None:
         self.user_id = dic['user_id']
         self.user_name = dic['user_name']
         self.user_gender = dic['user_gender']
         self.user_sid = dic['user_sid']
         self.user_phone = dic['user_phone']
         self.user_type = dic['user_type']
コード例 #9
0
    def __init__(self, **kwargs):
        # A bit of duplication here keeps the kwargs being
        # set but encrypts the password.
        for k, v in kwargs.items():
            if k != 'password':
                setattr(self, k, v)
            else:
                self.set_password(v)

        OurMixin.__init__(self)
        UserMixin.__init__(self)
コード例 #10
0
 def __init__(self, dic=None):
     UserMixin.__init__(self)
     self.get_order = []
     if dic is not None:
         # print("111111111111111111111111111111")
         self.delivery_id= dic['delivery_id']
         self.delivery_name= dic['delivery_name']
         self.delivery_path = dic['delivery_path']
         self.delivery_service_year= dic['delivery_year']
         self.delivery_phone = dic['delivery_phone']
         self.delivery_rank = dic['delivery_rank']
コード例 #11
0
ファイル: models.py プロジェクト: kumquatexpress/Venn
 def init(self, *args, **kwargs):
     UserMixin.__init__(self, *args, **kwargs)
     self.data = None
コード例 #12
0
ファイル: potsfyi.py プロジェクト: graue/potsfyi
 def __init__(self, user_id):
     UserMixin.__init__(self)
     self.user_id = user_id
     self.admin = (self.user_id == app.config['ADMIN_EMAIL'])
コード例 #13
0
ファイル: user.py プロジェクト: XGiton/5200k
 def __init__(self, **kwargs):
     UserMixin.__init__(self)
     for k, v in kwargs.items():
         self.__setattr__(k, v)
コード例 #14
0
 def __init__(self, id, username, password, hashcode):
     UserMixin.__init__(self)
     self.id = id
     self.username = username
     self.password = password
     self.hashcode = hashcode
コード例 #15
0
 def __init__(self, username=None, id=None):
     UserMixin.__init__(self)
     db.Model.__init__(self)
     self.id = id
     self.username = username
     self.passhash = None
コード例 #16
0
 def __init__(self, *args, **kwargs):
     UserMixin.__init__(self)
     db.Model.__init__(self, *args, **kwargs)
コード例 #17
0
ファイル: user.py プロジェクト: janripke/snapsnare
 def __init__(self, id_, username, password):
     UserMixin.__init__(self)
     self.id = id_
     self.username = username
     self.password = password
コード例 #18
0
 def __init__(self, id, password):
     UserMixin.__init__(self)
     self.id = id
     self.password_hash = password
コード例 #19
0
 def __init__(self, username, roles):
     UserMixin.__init__(self)
     self.id = username
     self.roles = roles
     User.users[self.id] = self