Created
August 11, 2011 21:17
-
-
Save reedobrien/1140803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from colander import Email | |
from colander import Schema | |
from colander import SchemaNode | |
from colander import Sequence | |
from colander import SequenceSchema | |
from colander import String | |
from colander import Tuple | |
from colander import null | |
from limone_zodb import content_schema | |
#from zodb_auth import User | |
from tgc.security import DEFAULT_GROUPS | |
class Groups(SequenceSchema): | |
group = SchemaNode(Tuple(), missing=DEFAULT_GROUPS) | |
class User(Schema): | |
__acl__ = Groups(missing=()) | |
display_name = SchemaNode(String(), missing=null) | |
email = SchemaNode(String(), validator=Email()) | |
last_login = SchemaNode(String(),missing=null) | |
password_hmac = SchemaNode(String(),) | |
userid = SchemaNode(String(),) | |
@content_schema | |
class Vendor(User): | |
region = SchemaNode(String('UTF-8')) | |
category = SchemaNode(String('UTF-8')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment