示例#1
0
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
示例#2
0
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'})
示例#3
0
class RegisterInput(model.Type):
    email = model.EmailField()
    password = model.PasswordField()
    password_confirmation = model.PasswordField()
    token = model.TextField()

    class Meta:
        input = True
示例#4
0
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'), )
示例#5
0
class User(model.Model):
    name = model.TextField()
    email = model.EmailField(unique=True, null=False)
    password = model.PasswordField()
示例#6
0
class AuthenticateInput(model.Type):
    email = model.EmailField()
    password = model.PasswordField()

    class Meta:
        input = True