Esempio n. 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)
Esempio n. 2
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)
Esempio n. 3
0
 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
Esempio n. 4
0
 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
Esempio n. 5
0
 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
Esempio n. 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']
Esempio n. 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
Esempio n. 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']
Esempio n. 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)
Esempio n. 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']
Esempio n. 11
0
 def init(self, *args, **kwargs):
     UserMixin.__init__(self, *args, **kwargs)
     self.data = None
Esempio n. 12
0
 def __init__(self, user_id):
     UserMixin.__init__(self)
     self.user_id = user_id
     self.admin = (self.user_id == app.config['ADMIN_EMAIL'])
Esempio n. 13
0
File: user.py Progetto: XGiton/5200k
 def __init__(self, **kwargs):
     UserMixin.__init__(self)
     for k, v in kwargs.items():
         self.__setattr__(k, v)
Esempio n. 14
0
 def __init__(self, id, username, password, hashcode):
     UserMixin.__init__(self)
     self.id = id
     self.username = username
     self.password = password
     self.hashcode = hashcode
Esempio n. 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
Esempio n. 16
0
 def __init__(self, *args, **kwargs):
     UserMixin.__init__(self)
     db.Model.__init__(self, *args, **kwargs)
Esempio n. 17
0
 def __init__(self, id_, username, password):
     UserMixin.__init__(self)
     self.id = id_
     self.username = username
     self.password = password
Esempio n. 18
0
 def __init__(self, id, password):
     UserMixin.__init__(self)
     self.id = id
     self.password_hash = password
Esempio n. 19
0
 def __init__(self, username, roles):
     UserMixin.__init__(self)
     self.id = username
     self.roles = roles
     User.users[self.id] = self