__version__ = {'major': 0, 'minor': 1}


def make_passwordmanager():
    from cryptacular.bcrypt import BCRYPTPasswordManager
    from cryptacular.core import DelegatingPasswordManager
    from ziggurat_foundations.utils import PlaceholderPasswordChecker
    return DelegatingPasswordManager(
        preferred=BCRYPTPasswordManager(),
        fallbacks=(PlaceholderPasswordChecker(),)
    )

# this maps models together during runtime so we can access them in methods:
#
# def foo(self):
#     query(self, self.OtherModel)
#


def ziggurat_model_init(*k, **kw):

    for cls in k:
        if cls.__name__ == 'User':
            if kw.get('passwordmanager'):
                cls.passwordmanager = kw['passwordmanager']
            else:
                cls.passwordmanager = make_passwordmanager()
        for cls2 in k:
            setattr(cls, cls2.__name__, cls2)

@@ -28,16 +28,28 @@
 'minor':
+ 4, 'patch':
  1%7D%0A%0A%0Ade

bump to 0.4.1