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
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)
""" users """ from zoom.apps import App app = App() app.menu = ('Overview', 'Users', 'Groups', 'Apps', 'Jobs', 'Database', 'Mail', 'Requests', 'Activity', 'Errors', 'Audit', 'Configuration', 'Environment', 'About')
""" 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'
""" 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')
""" forgot password app """ from zoom.apps import App app = App()
""" storage """ from zoom.apps import App app = App() app.menu = 'Overview', 'About'
""" users """ from zoom.apps import App app = App() app.menu = 'Overview', 'Users', 'Groups', 'Mail', 'Activity', 'Requests', 'Errors', 'Audit', 'Configuration', 'About'