VB
в django есть
Size: a a a
VB
DT
DT
F
F
DT
F
FK
VB
REQUIRED_FIELDS = ('first_name', 'last_name', 'password', 'birth_date')
VB
F
VB
class MyUserManager(BaseUserManager):вот юзер менеджер
"""
A custom user manager to deal with emails as unique identifiers for auth
instead of usernames. The default that's used is "UserManager"
"""
def _create_user(self, email, password, **extra_fields):
"""
Creates and saves a User with the given email and password.
"""
if not email:
raise ValueError('The Email must be set')
email = self.normalize_email(email)
user = self.model(email=email, **extra_fields)
user.set_password(password)
user.save()
return user
def create_superuser(self, email, password, **extra_fields):
extra_fields.setdefault('is_staff', True)
extra_fields.setdefault('is_superuser', True)
extra_fields.setdefault('is_active', True)
if extra_fields.get('is_staff') is not True:
raise ValueError('Superuser must have is_staff=True.')
if extra_fields.get('is_superuser') is not True:
raise ValueError('Superuser must have is_superuser=True.')
return self._create_user(email, password, **extra_fields)
FK
FK
F
FK
t = ('RHAT',)
c.execute('SELECT * FROM stocks WHERE symbol=?', t)
FK