def start_views(app, db):
    admin = Admin(app, name='Dashboard', base_template='admin/base.html', template_mode='bootstrap3',
                  index_view=HomeView())
    admin.add_view(GenericView(Role, db.session, "Funções", category='Usuário'))
    admin.add_view(UserView(User, db.session, "Usuários", category='Usuário'))
    admin.add_view(GenericView(State, db.session, "Estados"))
    admin.add_view(GenericView(Disease, db.session, "Doenças", category='Hospital'))
    admin.add_view(GenericView(Patient, db.session, "Pacientes", category='Hospital'))
    admin.add_view(GenericView(DiseaseState, db.session, "Condições", category='Hospital'))

    admin.add_link(MenuLink(name='Logout', url='/logout'))
def start_views(app, db):
    admin = Admin(app,
                  name='Nome da aplicacao',
                  base_template='admin/base.html',
                  template_mode='bootstrap3',
                  index_view=HomeView())

    admin.add_view(RoleView(Role, db.session, "Funções", category="Usuários"))
    admin.add_view(UserView(User, db.session, "Usuários", category="Usuários"))

    admin.add_link(MenuLink(name='Logout', url='/logout'))
Beispiel #3
0
def start_views(app, db):
    admin = Admin(app,
                  name="WareHouse",
                  base_template='admin/base.html',
                  template_mode="bootstrap3",
                  index_view=HomeView())
    admin.add_view(ModelView(Role, db.session, "Functions", category='Users'))
    admin.add_view(UserView(User, db.session, "Users", category="Users"))
    admin.add_view(
        ModelView(Category, db.session, "Categories", category="Products"))
    admin.add_view(ModelView(Product, db.session, "Products"))
    admin.add_link((MenuLink(name='Logout', url='/Logout')))
Beispiel #4
0
def start_views(app, db):
    admin = Admin(app,
                  name='Meu Estoque',
                  base_template='admin/base.html',
                  template_mode='bootstrap3',
                  index_view=HomeView())
    admin.add_view(ModelView(Role, db.session, "Funções", category="Usuários"))
    admin.add_view(UserView(User, db.session, "Usuários", category="Usuários"))
    admin.add_view(
        ModelView(Category, db.session, 'Categorias', category="Produtos"))
    admin.add_view(
        ModelView(Product, db.session, "Produtos", category="Produtos"))
    admin.add_link(MenuLink(name='Logout', url='/logout'))
Beispiel #5
0
def start_views(app, db):
    admin = Admin(app,
                  name="Meu Estoque",
                  template_mode="bootstrap3",
                  index_view=HomeView())

    admin.add_view(RoleView(Role, db.session, "Funções", category="Usuários"))
    admin.add_view(UserView(User, db.session, "Usuários", category="Usuários"))
    admin.add_view(
        CategoryView(Category, db.session, "Categorias", category="Produtos"))
    admin.add_view(
        ProductView(Product, db.session, "Produtos", category="Produtos"))

    admin.add_link(MenuLink(name="Logout", url="/logout"))
Beispiel #6
0
def start_views(app, db):
    admin = Admin(app,
                  name='Catálogo',
                  base_template='admin/base.html',
                  template_mode='bootstrap3',
                  index_view=HomeView())
    admin.add_view(CargoView(Cargo, db.session, "Cargos", category="Usuários"))
    admin.add_view(UserView(User, db.session, "Usuários", category="Usuários"))
    admin.add_view(
        DepartmentView(Department, db.session, "Setores", category="Usuários"))
    admin.add_view(
        TyperegView(TypesReg,
                    db.session,
                    "Tipos de Registro",
                    category="Documentos"))
    admin.add_view(
        DocumentsView(Documents,
                      db.session,
                      "Documentos",
                      category="Documentos"))

    admin.add_link(MenuLink(name='Logout', url='/logout'))