class AuthenticateInput(model.Type): email = model.EmailField() password = model.PasswordField() class Meta: # TODO: Could actually ignore this, and then automatically # generate Input types when needed. input = True
class User(model.Model): name = model.TextField() email = model.EmailField(unique=True, null=False) password = model.PasswordField() created = model.DatetimeField(default=Auto) class Meta: app = type('App', (), {'name': 'auth'})
class RegisterInput(model.Type): email = model.EmailField() password = model.PasswordField() password_confirmation = model.PasswordField() token = model.TextField() class Meta: input = True
class User(model.Model): name = model.TextField(null=True) email = model.EmailField(null=True, unique=True) password = model.PasswordField(null=True, omit=omit.ALL) logged_out = model.DatetimeField(null=True, omit=omit.ALL) created = model.DatetimeField(default=model.Auto) anonymous = model.BoolField(default=False) entity = model.RelatedField(Entity, related_name='users', null=True) # TODO: One-to-one class Meta: policies = (OwnerPolicy('auth_user.entity'), )
class User(model.Model): name = model.TextField() email = model.EmailField(unique=True, null=False) password = model.PasswordField()
class AuthenticateInput(model.Type): email = model.EmailField() password = model.PasswordField() class Meta: input = True