本文整理汇总了Python中allura.app.Application.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Application.__init__方法的具体用法?Python Application.__init__怎么用?Python Application.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类allura.app.Application
的用法示例。
在下文中一共展示了Application.__init__方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
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','.')]
示例2: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
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={})
示例3: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
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')]
示例4: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = RootController()
self.admin = LinkAdminController(self)
self.api_root = RootRestController(self)
示例5: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
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)
示例6: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = RootController()
self.admin = BlogAdminController(self)
示例7: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = ProjectHomeController()
self.templates = pkg_resources.resource_filename(
'allura.ext.project_home', 'templates')
示例8: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
def __init__(self, user, config):
Application.__init__(self, user, config)
self.root = UserProfileController()
self.templates = pkg_resources.resource_filename(
'allura.ext.user_profile', 'templates')
示例9: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
def __init__(self, project, config):
Application.__init__(self, project, config)
self.admin = RepoAdminController(self)
示例10: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = RootController()
示例11: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = ForgeActivityController(self)
self.api_root = ForgeActivityRestController(self)
示例12: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
def __init__(self, project, config):
Application.__init__(self, project, config)
self.root = SearchController()
self.templates = pkg_resources.resource_filename('allura.ext.search', 'templates')
示例13: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
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")]
示例14: __init__
# 需要导入模块: from allura.app import Application [as 别名]
# 或者: from allura.app.Application import __init__ [as 别名]
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", ".")]