Пример #1
0
 def __init__(self,
              email,
              name,
              password,
              learned_language=None,
              native_language=None,
              invitation_code=None):
     self.email = email
     self.name = name
     self.update_password(password)
     self.learned_language = learned_language or Language.default_learned()
     self.native_language = native_language or Language.default_native_language(
     )
     self.invitation_code = invitation_code
Пример #2
0
 def __init__(self,
              email,
              name,
              password,
              learned_language=None,
              native_language=None,
              invitation_code=None,
              cohort=None):
     self.email = email
     self.name = name
     self.update_password(password)
     self.learned_language = learned_language or Language.default_learned()
     self.native_language = native_language or Language.default_native_language(
     )
     self.invitation_code = invitation_code
     self.cohort = cohort
     # Add the learned language to user languages and set reading_news to True
     # so that the user has articles in the reader when opening it for the first time.
     from zeeguu.model import UserLanguage
     UserLanguage(self,
                  learned_language or Language.default_learned(),
                  reading_news=True)
Пример #3
0
 def __init__(self, email, username, password, learned_language=None, native_language = None):
     self.email = email
     self.name = username
     self.update_password(password)
     self.learned_language = learned_language or Language.default_learned()
     self.native_language = native_language or Language.default_native_language()