Мне удалось найти документацию по PageEditor
из этого ответа .
Но я не могу найти информацию о том, как создать правильный ScriptContext
объект для передачи в PageEditor
в качестве параметра запроса.
Когда я пытаюсь создать ScriptContext
, как в примерах, я получаю следующие ошибки.
[Fri Mar 11 11:04:42] [root]@[dev] /usr/local/share/moin
# python2.6
Python 2.6.5 (r265:79063, Jun 4 2010, 21:43:07)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from MoinMoin.web.contexts import ScriptContext
2011-03-11 11:05:01,828 WARNING MoinMoin.log:139 using logging configuration read from built-in fallback in MoinMoin.log
module!
2011-03-11 11:05:02,015 WARNING MoinMoin.log:111 /usr/lib/python2.6/site-packages/MoinMoin/support/pygments/plugin.py:39
: UserWarning: Module site was already imported from /usr/lib/python2.6/site.pyc, but /usr/lib/python2.6/site-packages i
s being added to sys.path
>>> request = ScriptContext()
2011-03-11 11:05:07,495 INFO MoinMoin.config.multiconfig:93 using farm config: /usr/local/share/moin/farmconfig.pyc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/MoinMoin/web/contexts.py", line 439, in __init__
wsgiapp.init(self)
File "/usr/lib/python2.6/site-packages/MoinMoin/wsgiapp.py", line 51, in init
context.lang = setup_i18n_preauth(context)
File "/usr/lib/python2.6/site-packages/MoinMoin/wsgiapp.py", line 233, in setup_i18n_preauth
i18n.i18n_init(context)
File "/usr/lib/python2.6/site-packages/MoinMoin/i18n/__init__.py", line 72, in i18n_init
meta_cache = caching.CacheEntry(request, 'i18n', 'meta', scope='wiki', use_pickle=True)
File "/usr/lib/python2.6/site-packages/MoinMoin/caching.py", line 71, in __init__
self.arena_dir = get_arena_dir(request, arena, scope)
File "/usr/lib/python2.6/site-packages/MoinMoin/caching.py", line 32, in get_arena_dir
return os.path.join(request.cfg.cache_dir, request.cfg.siteid, arena)
File "/usr/lib/python2.6/site-packages/MoinMoin/web/contexts.py", line 56, in get
res = obj.environ.setdefault(self.name, factory(obj))
File "/usr/lib/python2.6/site-packages/MoinMoin/web/contexts.py", line 132, in cfg
raise NotFound('<p>No wiki configuration matching the URL found!</p>')
werkzeug.exceptions.NotFound: 404 Not Found
Что такое магическое заклинание для создания ScriptContext()
с конфигурацией wikifarm?