@expose('/')
def index(self):
    from app import db
    from .models import Partner, Unit, Application, Doctype
    session = db.session
    partner = session.query(Partner).count()
    unit = session.query(Unit).count()
    application = session.query(Application).count()
    doctype = session.query(Doctype).count()
    self.update_redirect()
    return self.render_template(self.index_template, appbuilder=self.appbuilder, partner=partner, unit=unit, material=application, doctype=doctype, user=g.user)
@expose('/')
def index(self):
    from app import db
    from .models import Partner, Unit, Application, Doctype
    session = db.session
    partner = session.query(Partner).count()
    unit = session.query(Unit).count()
    application = session.query(Application).count()
    doctype = session.query(Doctype).count()
    self.update_redirect()
    return self.render_template(self.index_template, appbuilder=self.appbuilder, partner=partner, unit=unit, material=application, doctype=doctype, user=g.user)