本文整理汇总了Python中allura.app.Application类的典型用法代码示例。如果您正苦于以下问题:Python Application类的具体用法?Python Application怎么用?Python Application使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Application类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: install_app
def install_app():
project = create_project('myproject')
app_config = create_app_config(project, 'my_mounted_app')
# XXX: Remove project argument to install; it's redundant
app = Application(project, app_config)
app.install(project)
return app
示例2: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = ProjectAdminController()
self.api_root = ProjectAdminRestController()
self.admin = AdminAppAdminController(self)
self.templates = pkg_resources.resource_filename('allura.ext.admin', 'templates')
self.sitemap = [ SitemapEntry('Admin','.')]
示例3: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = RootController()
self.api_root = RootRestController()
self.admin = ForumAdminController(self)
self.default_forum_preferences = dict(
subscriptions={})
示例4: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
role_admin = M.ProjectRole.by_name('Admin', project)._id
role_anon = M.ProjectRole.by_name('*anonymous', project)._id
self.config.acl = [
M.ACE.allow(role_anon, 'read'),
M.ACE.allow(role_admin, 'admin')]
示例5: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = RootController()
self.admin = LinkAdminController(self)
self.api_root = RootRestController(self)
示例6: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.channel = CM.ChatChannel.query.get(app_config_id=config._id)
self.root = RootController()
self.admin = AdminController(self)
示例7: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = RootController()
self.admin = BlogAdminController(self)
示例8: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = ProjectHomeController()
self.templates = pkg_resources.resource_filename(
'allura.ext.project_home', 'templates')
示例9: __init__
def __init__(self, user, config):
Application.__init__(self, user, config)
self.root = UserProfileController()
self.templates = pkg_resources.resource_filename(
'allura.ext.user_profile', 'templates')
示例10: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.admin = RepoAdminController(self)
示例11: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = RootController()
示例12: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = ForgeActivityController(self)
self.api_root = ForgeActivityRestController(self)
示例13: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = SearchController()
self.templates = pkg_resources.resource_filename('allura.ext.search', 'templates')
示例14: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
role_admin = M.ProjectRole.by_name("Admin", project)._id
role_anon = M.ProjectRole.by_name("*anonymous", project)._id
self.config.acl = [M.ACE.allow(role_anon, "read"), M.ACE.allow(role_admin, "admin")]
示例15: __init__
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = ProjectAdminController()
self.admin = AdminAppAdminController(self)
self.templates = pkg_resources.resource_filename("allura.ext.admin", "templates")
self.sitemap = [SitemapEntry("Admin", ".")]