当前位置: 首页>>代码示例>>Python>>正文


Python app.Application类代码示例

本文整理汇总了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
开发者ID:abhinavthomas,项目名称:allura,代码行数:7,代码来源:test_app.py

示例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','.')]
开发者ID:jekatgithub,项目名称:incubator-allura,代码行数:7,代码来源:admin_main.py

示例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={})
开发者ID:pombredanne,项目名称:incubator-allura,代码行数:7,代码来源:forum_main.py

示例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')]
开发者ID:jekatgithub,项目名称:incubator-allura,代码行数:7,代码来源:main.py

示例5: __init__

 def __init__(self, project, config):
     Application.__init__(self, project, config)
     self.root = RootController()
     self.admin = LinkAdminController(self)
     self.api_root = RootRestController(self)
开发者ID:jekatgithub,项目名称:incubator-allura,代码行数:5,代码来源:link_main.py

示例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)
开发者ID:johnsca,项目名称:incubator-allura,代码行数:5,代码来源:main.py

示例7: __init__

 def __init__(self, project, config):
     Application.__init__(self, project, config)
     self.root = RootController()
     self.admin = BlogAdminController(self)
开发者ID:Bitergia,项目名称:allura,代码行数:4,代码来源:main.py

示例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')
开发者ID:johnsca,项目名称:incubator-allura,代码行数:5,代码来源:project_main.py

示例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')
开发者ID:pombredanne,项目名称:SourceForge-Allura,代码行数:5,代码来源:user_main.py

示例10: __init__

 def __init__(self, project, config):
     Application.__init__(self, project, config)
     self.admin = RepoAdminController(self)
开发者ID:johnsca,项目名称:incubator-allura,代码行数:3,代码来源:repository.py

示例11: __init__

 def __init__(self, project, config):
     Application.__init__(self, project, config)
     self.root = RootController()
开发者ID:Bitergia,项目名称:allura,代码行数:3,代码来源:dl_main.py

示例12: __init__

 def __init__(self, project, config):
     Application.__init__(self, project, config)
     self.root = ForgeActivityController(self)
     self.api_root = ForgeActivityRestController(self)
开发者ID:apache,项目名称:incubator-allura,代码行数:4,代码来源:main.py

示例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')
开发者ID:johnsca,项目名称:incubator-allura,代码行数:4,代码来源:search_main.py

示例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")]
开发者ID:johnsca,项目名称:incubator-allura,代码行数:5,代码来源:main.py

示例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", ".")]
开发者ID:pombredanne,项目名称:SourceForge-Allura,代码行数:6,代码来源:admin_main.py


注:本文中的allura.app.Application类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。