- 浏览: 884686 次
- 性别:
- 来自: 湖南省
最新评论
def _makeConfig(name):
""" Create and return a config instance
Timestamp config with either module mtime or farmconfig mtime. This
mtime can be used later to invalidate older caches.
@param name: module name
@rtype: DefaultConfig sub class instance
@return: new configuration instance
"""
global _farmconfig_mtime
try:
module, mtime = _importConfigModule(name)
configClass = getattr(module, 'Config')
cfg = configClass(name)
cfg.cfg_mtime = max(mtime, _farmconfig_mtime)
logging.info("using wiki config: %s" % os.path.abspath(module.__file__))
except ImportError, err:
logging.exception('Could not import.')
msg = """ImportError: %(err)s
Check that the file is in the same directory as the server script. If
it is not, you must add the path of the directory where the file is
located to the python path in the server script. See the comments at
the top of the server script.
Check that the configuration file name is either "wikiconfig.py" or the
module name specified in the wikis list in farmconfig.py. Note that the
module name does not include the ".py" suffix.
""" % {
'err': err,
}
raise error.ConfigurationError(msg)
except AttributeError, err:
logging.exception('An exception occured.')
msg = """AttributeError: %(err)s
Could not find required "Config" class in "%(name)s.py".
This might happen if you are trying to use a pre 1.3 configuration file, or
made a syntax or spelling error.
Another reason for this could be a name clash. It is not possible to have
config names like e.g. stats.py - because that collides with MoinMoin/stats/ -
have a look into your MoinMoin code directory what other names are NOT
possible.
Please check your configuration file. As an example for correct syntax,
use the wikiconfig.py file from the distribution.
""" % {
'name': name,
'err': err,
}
raise error.ConfigurationError(msg)
return cfg
def _getConfigName(url):
""" Return config name for url or raise """
for name, regex in _url_re_list():
match = regex.match(url)
if match:
return name
raise error.NoConfigMatchedError
def getConfig(url):
""" Return cached config instance for url or create new one
If called by many threads in the same time multiple config
instances might be created. The first created item will be
returned, using dict.setdefault.
@param url: the url from request, possibly matching specific wiki
@rtype: DefaultConfig subclass instance
@return: config object for specific wiki
"""
cfgName = _getConfigName(url)
try:
cfg = _config_cache[cfgName]
except KeyError:
cfg = _makeConfig(cfgName)
cfg = _config_cache.setdefault(cfgName, cfg)
return cfg
# This is a way to mark some text for the gettext tools so that they don't
# get orphaned. See http://www.python.org/doc/current/lib/node278.html.
def _(text):
return text
class CacheClass:
""" just a container for stuff we cache """
pass
class ConfigFunctionality(object):
""" Configuration base class with config class behaviour.
This class contains the functionality for the DefaultConfig
class for the benefit of the WikiConfig macro.
"""
# attributes of this class that should not be shown
# in the WikiConfig() macro.
cfg_mtime = None
siteid = None
cache = None
mail_enabled = None
jabber_enabled = None
auth_can_logout = None
auth_have_login = None
auth_login_inputs = None
_site_plugin_lists = None
_iwid = None
_iwid_full = None
xapian_searchers = None
moinmoin_dir = None
# will be lazily loaded by interwiki code when needed (?)
shared_intermap_files = None
""" Create and return a config instance
Timestamp config with either module mtime or farmconfig mtime. This
mtime can be used later to invalidate older caches.
@param name: module name
@rtype: DefaultConfig sub class instance
@return: new configuration instance
"""
global _farmconfig_mtime
try:
module, mtime = _importConfigModule(name)
configClass = getattr(module, 'Config')
cfg = configClass(name)
cfg.cfg_mtime = max(mtime, _farmconfig_mtime)
logging.info("using wiki config: %s" % os.path.abspath(module.__file__))
except ImportError, err:
logging.exception('Could not import.')
msg = """ImportError: %(err)s
Check that the file is in the same directory as the server script. If
it is not, you must add the path of the directory where the file is
located to the python path in the server script. See the comments at
the top of the server script.
Check that the configuration file name is either "wikiconfig.py" or the
module name specified in the wikis list in farmconfig.py. Note that the
module name does not include the ".py" suffix.
""" % {
'err': err,
}
raise error.ConfigurationError(msg)
except AttributeError, err:
logging.exception('An exception occured.')
msg = """AttributeError: %(err)s
Could not find required "Config" class in "%(name)s.py".
This might happen if you are trying to use a pre 1.3 configuration file, or
made a syntax or spelling error.
Another reason for this could be a name clash. It is not possible to have
config names like e.g. stats.py - because that collides with MoinMoin/stats/ -
have a look into your MoinMoin code directory what other names are NOT
possible.
Please check your configuration file. As an example for correct syntax,
use the wikiconfig.py file from the distribution.
""" % {
'name': name,
'err': err,
}
raise error.ConfigurationError(msg)
return cfg
def _getConfigName(url):
""" Return config name for url or raise """
for name, regex in _url_re_list():
match = regex.match(url)
if match:
return name
raise error.NoConfigMatchedError
def getConfig(url):
""" Return cached config instance for url or create new one
If called by many threads in the same time multiple config
instances might be created. The first created item will be
returned, using dict.setdefault.
@param url: the url from request, possibly matching specific wiki
@rtype: DefaultConfig subclass instance
@return: config object for specific wiki
"""
cfgName = _getConfigName(url)
try:
cfg = _config_cache[cfgName]
except KeyError:
cfg = _makeConfig(cfgName)
cfg = _config_cache.setdefault(cfgName, cfg)
return cfg
# This is a way to mark some text for the gettext tools so that they don't
# get orphaned. See http://www.python.org/doc/current/lib/node278.html.
def _(text):
return text
class CacheClass:
""" just a container for stuff we cache """
pass
class ConfigFunctionality(object):
""" Configuration base class with config class behaviour.
This class contains the functionality for the DefaultConfig
class for the benefit of the WikiConfig macro.
"""
# attributes of this class that should not be shown
# in the WikiConfig() macro.
cfg_mtime = None
siteid = None
cache = None
mail_enabled = None
jabber_enabled = None
auth_can_logout = None
auth_have_login = None
auth_login_inputs = None
_site_plugin_lists = None
_iwid = None
_iwid_full = None
xapian_searchers = None
moinmoin_dir = None
# will be lazily loaded by interwiki code when needed (?)
shared_intermap_files = None
发表评论
-
并发与并行
2009-11-25 17:02 626并发: 一个CPU处理多个事务 并行: 多个CPU处理 ... -
abcd(3)
2009-09-14 15:17 780select * from payment; ... -
abcd(2)
2009-09-14 13:58 6821, 根据菜单Customer Care- ... -
abcd(1)
2009-09-14 13:54 8282.1 首先,导入autopay文件 LoadOut ... -
abcd
2009-09-14 13:18 8772009-2-25进入华为工作 BOSS总体介绍: 1, BO ... -
Oracle查询锁表语句,根据数据库用户进行查询
2009-09-11 16:31 6745// add by 2009-9-11 begin as 注 ... -
数据库优化(Oracle)SQL
2009-09-05 14:56 845--查看CUP的占用率 select c.spid spid, ... -
wiki配置说明
2009-09-04 11:59 945wiki所有配置所存的几个目录 Wiki安装之后需要配置或修 ... -
wiki配置管理
2009-09-04 11:58 793'openid_server': ('OpenID S ... -
wiki配置管理
2009-09-04 11:58 788'xapian': ('Xapian search', ... -
wiki配置管理
2009-09-04 11:55 1321('language_default', 'en', ... -
wiki配置管理
2009-09-04 11:54 806('url_prefix_action', None, ... -
wiki配置管理
2009-09-04 11:53 794# Standard buttons in the i ... -
wiki配置管理
2009-09-04 11:51 786507('supplementation_page', Fa ... -
wiki配置管理
2009-09-04 11:46 665options_no_group_name = { # = ... -
wiki配置管理
2009-09-04 11:45 707Make sure your data directory p ... -
wiki配置管理
2009-09-04 11:35 756for name in decode_name ... -
wiki配置管理
2009-09-04 11:34 605# lazily load iwid(_full) ... -
wiki配置管理
2009-09-04 11:33 745# check if python-xapia ... -
wiki配置管理
2009-09-04 11:32 651def __init__(self, siteid): ...
相关推荐
《SpringBoot2.0+Vue3.0前后端分离wiki文件管理系统源码解析》 在当前的互联网开发环境中,前后端分离已经成为了一种常见的架构模式,它可以提高开发效率,优化用户体验,同时也使得前后端职责更加明确。本系统采用...
本篇文章探讨了一种将Markdown文件自动实时同步到DokuWiki的方法,旨在结合两种工具的优势,提高文档管理的效率和便利性。 Markdown是一种轻量级的标记语言,因其简洁易读的格式而受到广泛欢迎,特别是在编写技术...
dokuwiki安装与配置 dokuwiki是一个功能强大且灵活的Wiki软件,能够帮助用户快速创建和管理知识库。下面是关于dokuwiki的安装和配置的知识点: 1. 安装dokuwiki 在Ubuntu系统上安装dokuwiki,首先需要下载doku...
**DokuWiki知识库管理** DokuWiki是一款开源的、专为团队协作设计的轻量级wiki系统。它不需要数据库,可以直接在纯文本文件中存储内容,这使得它易于备份、恢复和版本控制。这款软件特别适合小型团队用于文档共享、...
- “wiki安装文档.doc”提供了详细的安装流程,对于首次部署Wiki系统的用户非常有用,涵盖了服务器配置、数据库连接等关键步骤。 - “upgrade21utf8.zip”是针对某个旧版本(可能是2.1)的升级包,通常包含升级...
它的强大功能和灵活性使得用户可以创建和管理复杂的知识库。Mediawiki 支持多语言,包括中文,这使得中文用户能够轻松地搭建自己的Wiki站点。 ### Mediawiki的优势 1. **易用性**:Mediawiki 提供直观的用户界面,...
【Windows下Wiki安装配置详解】 在Windows环境下搭建Wiki平台,特别是对初学者而言,可能会遇到不少挑战。本文将详细介绍如何在Windows 2003服务器上安装和配置MediaWiki(MW),一个基于PHP开发的开源Wiki软件。MW...
【标题】"wiki(非常不错的wiki源码)"指的是一个用于创建和管理知识库的开源软件,可能是指HDWiki,这是一个广泛应用于构建企业或个人知识分享平台的系统。它提供了便捷的方式来组织、编辑和检索信息,使得知识的共享...
wiki 部署文档是关于在 CentOS 操作系统上安装和配置 Docker 环境的文档。该文档涵盖了从升级内核版本到安装 Docker 的整个过程。下面是该文档中所涉及到的知识点: 1. 查看内核版本:使用 uname -r 命令可以查看...
对于那些希望避免复杂数据库配置的用户来说,DokuWiki是一个理想的选择。 在安全性方面,DokuWiki表现出色,具备良好的权限管理系统,可以精细控制不同用户对内容的访问和编辑权限。这对于企业内部知识库的构建尤其...
AddNewPage简化了页面创建,XHEditor提供了高级的编辑体验,而SimpleNavi则优化了导航流程,使得DokuWiki成为一个更加高效的知识管理和协作平台。在实际应用中,可以根据团队的需求和工作流程,灵活选择和配置这些...
`Wiki.js` 是一个基于 `JavaScript` 开发的开源 Wiki 系统,专为个人和小企业设计,用于知识管理和信息共享。"windows版" 表明这个项目不仅支持常见的跨平台环境,还特别优化了在 Windows 操作系统上的部署和运行。 ...
在IT领域,DokuWiki是一个流行的开源wiki软件,主要用于创建和管理文档。它以其简洁的界面、易于编辑和强大的文本格式化能力而受到喜爱。然而,原生的DokuWiki支持的是其自有的wikitext语法,而不是更通用的Markdown...
DokuWiki是一个强大的开源wiki引擎,专为那些寻求简洁、高效知识管理解决方案的个人和团队设计。这个系统基于PHP开发,无需数据库支持,这使得它易于安装和维护,尤其适用于那些资源有限或对数据库操作不熟悉的小型...
基于Spring Boot的WIKI知识库管理系统 项目概述 本项目是一个基于Spring Boot框架开发的WIKI知识库管理系统,旨在提供一个高效、易用的平台来管理和分享知识。系统集成了多种功能,包括用户管理、文档管理、分类...
### TRIRIGA Wiki 设施管理软件:关键知识点解析 #### 一、设施管理与TRIRIGA Wiki - **设施管理(Facilities Management, FM)**:这是一门涉及建筑及其环境的综合管理学科,旨在确保组织的核心业务能够顺利进行...
10. **部署与维护**: 部署wiki建站系统需要考虑服务器环境配置、数据库安装、域名绑定等步骤,而后期维护则包括软件更新、数据备份、性能优化等。 综上所述,"wiki建站系统"是一个采用PHP开发的、仿照互动百科的...
2. **配置文件**:修改conf/dokuwiki.ini配置文件,根据实际需求调整各项参数,如语言、主题、权限等。 3. **初始化**:运行install.php脚本,按照提示完成初始化设置,包括创建管理员账号、设置站点信息等。 4. *...
### Puppet开源自动化配置管理平台详解 #### 一、Puppet简介与实现原理 Puppet是一款由Puppet Labs公司开发的开源自动化配置管理平台,旨在帮助系统管理员自动化IT基础设施的配置和管理过程。Puppet的核心设计理念...