# Path: datawire/core.py
# def url_for(*a, **kw):
# 
# Path: datawire/model/util.py
# def make_token():
#     num = uuid.uuid4().int
#     s = []
#     while True:
#         num, r = divmod(num, len(ALPHABET))
#         s.append(ALPHABET[r])
#         if num == 0:
#             break
#     return ''.join(reversed(s))
# 
# Path: datawire/model/forms.py
# class UserForm(colander.MappingSchema):
#     email = colander.SchemaNode(colander.String(),
#                                 validator=colander.Email())
#     login = colander.SchemaNode(colander.String())


import logging
from datetime import datetime
from datawire.core import db, login_manager, url_for
from datawire.model.util import make_token
from datawire.model.forms import UserForm


log = logging.getLogger(__name__)


@login_manager.user_loader
def load_user(login):
    return User.by_login(login)



# Path: datawire/core.py
# def url_for(*a, **kw):
# 
# Path: datawire/model/util.py
# def make_token():
#     num = uuid.uuid4().int
#     s = []
#     while True:
#         num, r = divmod(num, len(ALPHABET))
#         s.append(ALPHABET[r])
#         if num == 0:
#             break
#     return ''.join(reversed(s))
# 
# Path: datawire/model/forms.py
# class UserForm(colander.MappingSchema):
#     email = colander.SchemaNode(colander.String(),
#                                 validator=colander.Email())
#     login = colander.SchemaNode(colander.String())


# Path: datawire/model/user.py
import logging
from datetime import datetime
from datawire.core import db, login_manager, url_for
from datawire.model.util import make_token
from datawire.model.forms import UserForm



log = logging.getLogger(__name__)


@login_manager.user_loader
def load_user(login):
    return User.by_login(login)



class User(db.Model):