コード例 #1
0
    def __call__(self, request):
        logger = logging.getLogger(__name__)
        logger.debug('called content app with (%r) (%r)', request.route,
                     request.path)

        if request.path == '/':
            # this is a request to view the site index page
            request.path = '/show'
            request.route = request.path.split('/')
            return App.__call__(self, request)

        elif request.path == '/content/sitemap':
            return App.__call__(self, request)

        elif request.path.endswith('.html'):
            # this is a request to view a site page
            request.path = request.path + '/show'
            request.route = request.path.split('/')
            return App.__call__(self, request)

        elif request.path == '/content/images/get-image':
            # user is viewing an image
            return App.__call__(self, request)

        elif request.route and request.route[
                0] == 'content' and zoom.system.user.can('edit', self):
            # this is a request to manage site content
            self.menu = menu
            return App.__call__(self, request)

        return None
コード例 #2
0
    def __call__(self, request):
        logger = logging.getLogger(__name__)
        logger.debug('called content app with (%r) (%r)', request.route,
                     request.path)

        if request.path == '/':
            # this is a request to view the site index page
            request.path = '/show'
            request.route = request.path.split('/')
            return App.__call__(self, request)

        elif request.path.endswith('.html'):
            # this is a request to view a site page
            request.path = request.path + '/show'
            request.route = request.path.split('/')
            return App.__call__(self, request)

        elif request.route and request.route[0] == 'content':
            # this is a request to manage site content
            self.menu = ['Overview', 'Pages', 'Snippets']
            return App.__call__(self, request)
コード例 #3
0
ファイル: app.py プロジェクト: robinsax/zoom
"""
    users
"""

from zoom.apps import App

app = App()
app.menu = ('Overview', 'Users', 'Groups', 'Apps', 'Jobs', 'Database', 'Mail',
            'Requests', 'Activity', 'Errors', 'Audit', 'Configuration',
            'Environment', 'About')
コード例 #4
0
"""
    sample app

    Demonstrates the user interface features of Zoom
"""

import logging

from zoom.apps import App

app = App()
app.menu = 'Content', 'Fields', 'Collection', 'Components', 'Alerts', 'Parts', 'Tools', 'Missing', 'About'
コード例 #5
0
ファイル: app.py プロジェクト: ZoomFoundry/ZoomFoundry
"""
    sample app

    Demonstrates the user interface features of Zoom
"""

import logging

from zoom.apps import App

app = App()
app.menu = ('Content', 'Fields', 'Collection', 'Components', 'Widgets',
            'Charts', 'Alerts', 'Flags', 'Parts', 'Tools', 'Responses',
            'Background', 'About')
コード例 #6
0
ファイル: app.py プロジェクト: sean-hayes/zoom
"""
    forgot password app
"""

from zoom.apps import App

app = App()
コード例 #7
0
"""
    storage
"""

from zoom.apps import App

app = App()
app.menu = 'Overview', 'About'
コード例 #8
0
ファイル: app.py プロジェクト: sean-hayes/zoom
"""
    users
"""

from zoom.apps import App

app = App()
app.menu = 'Overview', 'Users', 'Groups', 'Mail', 'Activity', 'Requests', 'Errors', 'Audit', 'Configuration', 'About'