本文整理汇总了Python中models.Config.data_provider方法的典型用法代码示例。如果您正苦于以下问题:Python Config.data_provider方法的具体用法?Python Config.data_provider怎么用?Python Config.data_provider使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Config
的用法示例。
在下文中一共展示了Config.data_provider方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: register_handler
# 需要导入模块: from models import Config [as 别名]
# 或者: from models.Config import data_provider [as 别名]
# -*- coding: utf8 -*-
from viewer import Viewer
from editor import Editor
from http import register_handler,runserver
from models import GStatus,LStatus,Card,TicketView,Config,Tariff,EventsView,PaymentView,Terminal,User
from database_upload import DatabaseUploader
from server_side import ServerSideEditor
register_handler('/lstatus' , Viewer( LStatus.data_provider() ) )
register_handler('/card' , Editor( Card.data_provider() ) )
register_handler('/gstatus' , Viewer( GStatus.data_provider() ) )
register_handler('/ticket' , Viewer( TicketView.data_provider() ) )
register_handler('/config' , Editor( Config.data_provider(invert=True) ) )
register_handler('/tariff' , Editor( Tariff.data_provider() ) )
register_handler('/events' , Viewer( EventsView.data_provider() ) )
register_handler('/payment' , Viewer( PaymentView.data_provider() ) )
register_handler('/terminal', Editor( Terminal.data_provider() ) )
register_handler('/user' , Editor( User.data_provider(), secure = True ) )
register_handler('/upload' , DatabaseUploader() )
runserver()