MoinQ:

1. MoinAPI/user

これが動かないなら、ページ作成が失敗するはずだが、いまは失敗していない。それも謎。-- ToshinoriMaeno 2021-04-28 06:29:17

https://stackoverflow.com/questions/5275856/moinmoin-1-9-programmatically-creating-page-error-moinmoin-pageeditor-accessden

You need to get a User and attach it to the ScriptContext object, here called request.

>>> import MoinMoin.user
>>> user = MoinMoin.user.get_by_email_address(request,'jarrod.roberson@mycompany.com')
>>> request.user = user
>>> pe = PageEditor(request, 'MyNewTestPage')
>>> pe.saveText('Hello World!', 0)

1.1. MoinMoin.user ERROR

$ python
Python 2.7.17 (default, Feb 27 2021, 15:10:58) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MoinMoin.user
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/MoinMoin/user.py", line 27, in <module>
    import md5crypt

support/ にあるのだが、見つけられないようだ。why -- ToshinoriMaeno 2021-04-28 05:51:22

import support/md5crypt にすれば、通る。-- ToshinoriMaeno 2021-04-28 10:00:37

MoinQ: MoinAPI/user (last edited 2021-04-28 10:00:37 by ToshinoriMaeno)