示例#1
0
文件: apps.py 项目: lmacken/moksha
    def container(self, application, height=675, width=910, left=55,
                  top=50, **kw):
        """ Return an application rendered in a Moksha Widget Container """
        app = moksha.get_app(application)
        if not app:
            raise ApplicationNotFound(application)

        tmpl_context.widget = appwidget_container

        options = {}
        options['layout'] = [
            Category('main', [
                MokshaWidget(None, 'moksha_container', params={
                    'id': application + '_container',
                    'title': app['name'],
                    'content': appwidget_container(layout=[
                        Category('main', [MokshaApp(None, application,
                                                    params=kw)])]),
                    'height': 675,
                    'width': 910,
                    'left': 55,
                    'top': 50,
                    })
                ]),
        ]

        return dict(options=options)
示例#2
0
    def container(self,
                  application,
                  height=675,
                  width=910,
                  left=55,
                  top=50,
                  **kw):
        """ Return an application rendered in a Moksha Widget Container """
        app = moksha.get_app(application)
        if not app:
            raise ApplicationNotFound(application)

        tmpl_context.widget = appwidget_container

        options = {}
        options['layout'] = [
            Category('main', [
                MokshaWidget(
                    None,
                    'moksha_container',
                    params={
                        'id':
                        application + '_container',
                        'title':
                        app['name'],
                        'content':
                        appwidget_container(layout=[
                            Category('main',
                                     [MokshaApp(None, application, params=kw)])
                        ]),
                        'height':
                        675,
                        'width':
                        910,
                        'left':
                        55,
                        'top':
                        50,
                    })
            ]),
        ]

        return dict(options=options)
示例#3
0
文件: apps.py 项目: lmacken/moksha
 def _lookup(self, app, *remainder):
     if app not in moksha._apps:
         raise ApplicationNotFound(app)
     return moksha.get_app(app), remainder
示例#4
0
 def _lookup(self, app, *remainder):
     if app not in moksha._apps:
         raise ApplicationNotFound(app)
     return moksha.get_app(app), remainder