本文整理汇总了Python中steelscript.appfwk.apps.devices.devicemanager.DeviceManager.get_modules方法的典型用法代码示例。如果您正苦于以下问题:Python DeviceManager.get_modules方法的具体用法?Python DeviceManager.get_modules怎么用?Python DeviceManager.get_modules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类steelscript.appfwk.apps.devices.devicemanager.DeviceManager
的用法示例。
在下文中一共展示了DeviceManager.get_modules方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from steelscript.appfwk.apps.devices.devicemanager import DeviceManager [as 别名]
# 或者: from steelscript.appfwk.apps.devices.devicemanager.DeviceManager import get_modules [as 别名]
def __init__(self, *args, **kwargs):
super(DeviceDetailForm, self).__init__(*args, **kwargs)
modules = DeviceManager.get_modules()
choices = zip(modules, modules)
self.fields['module'] = forms.ChoiceField(choices=choices)
示例2: __init__
# 需要导入模块: from steelscript.appfwk.apps.devices.devicemanager import DeviceManager [as 别名]
# 或者: from steelscript.appfwk.apps.devices.devicemanager.DeviceManager import get_modules [as 别名]
def __init__(self, *args, **kwargs):
super(DeviceDetailForm, self).__init__(*args, **kwargs)
modules = DeviceManager.get_modules()
choices = zip(modules, modules)
self.fields['module'] = forms.ChoiceField(
choices=choices,
widget=forms.Select(attrs={"onChange": 'changeMod()'}))
示例3: test_get_modules
# 需要导入模块: from steelscript.appfwk.apps.devices.devicemanager import DeviceManager [as 别名]
# 或者: from steelscript.appfwk.apps.devices.devicemanager.DeviceManager import get_modules [as 别名]
def test_get_modules(self):
self.assertTrue('dev_module' in DeviceManager.get_modules())