Пример #1
0
def load():
    '''Load all models and export them into this module's namespace'''
    global __all__
    models_path = __path__[0]
    __all__ = pybald_class_loader(models_path, (models.Model, models.NonDbModel), globals(), locals())
Пример #2
0
def load():
    '''Load all controllers inherting from BaseController'''
    global __all__
    controllers_path = __path__[0]
    __all__ = pybald_class_loader(controllers_path, (BaseController,), globals(), locals())
Пример #3
0
#!/usr/bin/env python
# encoding: utf-8
from pybald.core.controllers import BaseController
from pybald.core import pybald_class_loader
controllers_path = __path__[0]
__all__ = pybald_class_loader(controllers_path, (BaseController,), globals(), locals())
Пример #4
0
#!/usr/bin/env python
# encoding: utf-8
from pybald.db import models
from pybald.core import pybald_class_loader

models_path = __path__[0]
__all__ = pybald_class_loader(models_path, (models.Model, models.NonDbModel), globals(), locals())

def create():
    """Create all models, issuing SQL to create the required storage representation."""
    models.Base.metadata.create_all()