Mercurial > moin-2.0-moinboot
changeset 2088:3c5da455daed
merged
| author | Tarashish Mishra <sunu0000@gmail.com> |
|---|---|
| date | Thu, 04 Apr 2013 17:25:26 +0530 |
| parents | 21ca87b32ddb (current diff) 1d8366403411 (diff) |
| children | d050c88db976 |
| files | |
| diffstat | 36 files changed, 239 insertions(+), 117 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/_tests/test_test_environ.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/_tests/test_test_environ.py Thu Apr 04 17:25:26 2013 +0530 @@ -34,7 +34,7 @@ assert storage.has_item(itemname) -CONTENT_ACL = dict( +DEFAULT_ACL = dict( before="+All:write", # need to write to sys pages default="All:read,write,admin,create,destroy", after="Me:create", @@ -45,8 +45,8 @@ class TestStorageEnvironWithConfig(object): class Config(wikiconfig.Config): - content_acl = CONTENT_ACL + default_acl = DEFAULT_ACL def test_config(self): assert isinstance(app.cfg, wikiconfig.Config) - assert app.cfg.content_acl == CONTENT_ACL + assert app.cfg.default_acl == DEFAULT_ACL
--- a/MoinMoin/_tests/wikiconfig.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/_tests/wikiconfig.py Thu Apr 04 17:25:26 2013 +0530 @@ -26,7 +26,7 @@ _root = abspath(join(_here, '..', '..')) data_dir = join(_here, 'wiki', 'data') # needed for plugins package TODO index_storage = 'FileStorage', (join(_here, 'wiki', 'index'), ), {} - content_acl = None + default_acl = None item_root = 'FrontPage' interwikiname = u'MoinTest' interwiki_map = dict(Self='http://localhost:8080/', MoinMoin='http://moinmo.in/')
--- a/MoinMoin/auth/__init__.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/auth/__init__.py Thu Apr 04 17:25:26 2013 +0530 @@ -455,7 +455,7 @@ auth_method=auth_method, auth_attribs=auth_attribs, trusted=trusted) - if userobj.valid and not userobj.validate_session(session_token): + if not userobj.validate_session(session_token): logging.debug("session token doesn't validate") # Destroy current session since it's no longer valid. userobj.logout_session(False)
--- a/MoinMoin/config/default.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/config/default.py Thu Apr 04 17:25:26 2013 +0530 @@ -451,6 +451,8 @@ ('create_index', False, "Create (initialize) the index before trying to use them."), ('destroy_storage', False, "Destroy (empty) the storage backends after using them."), ('destroy_index', False, "Destroy (empty) the index after using it."), + + ('mimetypes_to_index_as_empty', [], "List of mimetypes which are indexed as though they were empty."), )), # ========================================================================== 'items': ('Special Item Names', None, ( @@ -479,6 +481,7 @@ SHOW_COMMENTS: False, WANT_TRIVIAL: False, ENC_PASSWORD: u'', # empty value == invalid hash + SESSION_KEY: u'', # empty value == invalid key DISABLED: False, BOOKMARKS: {}, QUICKLINKS: [],
--- a/MoinMoin/conftest.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/conftest.py Thu Apr 04 17:25:26 2013 +0530 @@ -45,7 +45,7 @@ def init_test_app(given_config): namespace_mapping, backend_mapping, acl_mapping = \ - create_simple_mapping("stores:memory:", given_config.content_acl) + create_simple_mapping("stores:memory:", given_config.default_acl) more_config = dict( namespace_mapping=namespace_mapping, backend_mapping=backend_mapping,
--- a/MoinMoin/script/migration/moin19/import19.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/script/migration/moin19/import19.py Thu Apr 04 17:25:26 2013 +0530 @@ -31,6 +31,7 @@ from MoinMoin.constants.keys import * from MoinMoin.constants.contenttypes import CONTENTTYPE_USER +from MoinMoin.constants.itemtypes import ITEMTYPE_DEFAULT from MoinMoin.constants.namespaces import NAMESPACE_DEFAULT, NAMESPACE_USERPROFILES UID_OLD = 'old_user_id' # dynamic field *_id, so we don't have to change schema @@ -270,6 +271,7 @@ meta[ITEMID] = itemid meta[REVID] = make_uuid() meta[NAMESPACE] = NAMESPACE_DEFAULT + meta[ITEMTYPE] = ITEMTYPE_DEFAULT self.meta = {} for k, v in meta.iteritems(): if isinstance(v, list): @@ -345,6 +347,7 @@ meta[SIZE] = size meta[ITEMID] = make_uuid() meta[REVID] = make_uuid() + meta[ITEMTYPE] = ITEMTYPE_DEFAULT self.meta = meta
--- a/MoinMoin/security/_tests/test_security.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/security/_tests/test_security.py Thu Apr 04 17:25:26 2013 +0530 @@ -336,7 +336,7 @@ from MoinMoin._tests import wikiconfig class Config(wikiconfig.Config): - content_acl = dict(hierarchic=False, before=u"WikiAdmin:admin,read,write,create,destroy", default=u"All:read,write", after=u"All:read") + default_acl = dict(hierarchic=False, before=u"WikiAdmin:admin,read,write,create,destroy", default=u"All:read,write", after=u"All:read") acl_functions = u"SuperUser:superuser NoTextchaUser:notextcha" def setup_method(self, method): @@ -423,7 +423,7 @@ from MoinMoin._tests import wikiconfig class Config(wikiconfig.Config): - content_acl = dict(hierarchic=True, before=u"WikiAdmin:admin,read,write,create,destroy", default=u"All:read,write", after=u"All:read") + default_acl = dict(hierarchic=True, before=u"WikiAdmin:admin,read,write,create,destroy", default=u"All:read,write", after=u"All:read") def setup_method(self, method): become_trusted(username=u'WikiAdmin') @@ -497,7 +497,7 @@ from MoinMoin._tests import wikiconfig class Config(wikiconfig.Config): - content_acl = dict(hierarchic=True, before=u"WikiAdmin:admin,read,write,create,destroy", default=u"Editor:read,write", after=u"All:read") + default_acl = dict(hierarchic=True, before=u"WikiAdmin:admin,read,write,create,destroy", default=u"Editor:read,write", after=u"All:read") def setup_method(self, method): become_trusted(username=u'WikiAdmin')
--- a/MoinMoin/storage/__init__.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/storage/__init__.py Thu Apr 04 17:25:26 2013 +0530 @@ -54,7 +54,7 @@ def create_simple_mapping(uri='stores:fs:instance', - content_acl=None, user_profile_acl=None): + default_acl=None, userprofiles_acl=None): """ When configuring storage, the admin needs to provide a namespace_mapping. To ease creation of such a mapping, this function provides sane defaults @@ -79,10 +79,10 @@ to below /path/to/store/. """ # if no acls are given, use something mostly harmless: - if not content_acl: - content_acl = dict(before=u'', default=u'All:read,write,create', after=u'', hierarchic=False) - if not user_profile_acl: - user_profile_acl = dict(before=u'All:', default=u'', after=u'', hierarchic=False) + if not default_acl: + default_acl = dict(before=u'', default=u'All:read,write,create', after=u'', hierarchic=False) + if not userprofiles_acl: + userprofiles_acl = dict(before=u'All:', default=u'', after=u'', hierarchic=False) namespaces = { NAMESPACE_DEFAULT: BACKEND_DEFAULT, NAMESPACE_USERPROFILES + ':': BACKEND_USERPROFILES, @@ -92,7 +92,7 @@ BACKEND_USERPROFILES: None, } acls = { - NAMESPACE_USERPROFILES + ':': user_profile_acl, - NAMESPACE_DEFAULT: content_acl, + NAMESPACE_USERPROFILES + ':': userprofiles_acl, + NAMESPACE_DEFAULT: default_acl, } return create_mapping(uri, namespaces, backends, acls)
--- a/MoinMoin/storage/middleware/indexing.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/storage/middleware/indexing.py Thu Apr 04 17:25:26 2013 +0530 @@ -84,7 +84,7 @@ from MoinMoin import user from MoinMoin.search.analyzers import item_name_analyzer, MimeTokenizer, AclTokenizer from MoinMoin.themes import utctimestamp -from MoinMoin.storage.middleware.validation import ContentMetaSchema, UserMetaSchema +from MoinMoin.storage.middleware.validation import ContentMetaSchema, UserMetaSchema, validate_data from MoinMoin.storage.error import NoSuchItemError, ItemAlreadyExistsError @@ -193,6 +193,10 @@ def tell(self, *args, **kw): return self.data.tell(*args, **kw) + if meta[CONTENTTYPE] in app.cfg.mimetypes_to_index_as_empty: + logging.info("not indexing content of %r as requested by configuration".format(meta[NAME])) + return u'' + if not item_name: item_name = get_names(meta)[0] @@ -1060,6 +1064,7 @@ logging.warning("metadata validation failed, see below") for e in m.children: logging.warning("{0}, {1}".format(e.valid, e)) + logging.warning("data validation skipped as we have no valid metadata") if VALIDATION_HANDLING == VALIDATION_HANDLING_STRICT: raise ValueError('metadata validation failed and strict handling requested, see the log for details') @@ -1071,6 +1076,11 @@ # XXX do not kick out empty lists before fixing NAME processing: meta = dict([(k, v) for k, v in meta.items() if v not in [None, ]]) + if valid and not validate_data(meta, data): # need valid metadata to validate data + logging.warning("data validation failed") + if VALIDATION_HANDLING == VALIDATION_HANDLING_STRICT: + raise ValueError('data validation failed and strict handling requested, see the log for details') + if self.itemid is None: self.itemid = meta[ITEMID] backend = self.backend
--- a/MoinMoin/storage/middleware/validation.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/storage/middleware/validation.py Thu Apr 04 17:25:26 2013 +0530 @@ -104,7 +104,9 @@ return False if v.startswith(u'+'): # used for views, like /+meta/<itemname> return False - if v.endswith(u'/'): + if v.startswith(u'/') or v.endswith(u'/'): + return False + if u'//' in v: # empty ancestor name is invalid return False return True @@ -371,3 +373,26 @@ #TODO: DuckDict.named('bookmarks').using(optional=True), *common_meta ) + + +def validate_data(meta, data): + """ + validate the data contents, if possible + + :param meta: metadata dict + :param data: data file + :return: validation ok [bool] + """ + ct = Type(meta[keys.CONTENTTYPE]) + if ct.type != 'text': + return True # we can't validate non-text mimetypes, so assume it is ok + coding = ct.parameters['charset'].lower() + if coding not in ['ascii', 'utf-8', ]: + return True # checking 8bit encodings this way is pointless, decoding never raises + text_bytes = data.read() + data.seek(0) # rewind, so it can be read again + try: + text_bytes.decode(coding) + return True + except UnicodeDecodeError: + return False
--- a/MoinMoin/user.py Thu Apr 04 17:12:43 2013 +0530 +++ b/MoinMoin/user.py Thu Apr 04 17:25:26 2013 +0530 @@ -718,7 +718,18 @@ return self.generate_session_token() def validate_session(self, token): - """ Check if the session token is valid. """ + """ Check if the session token is valid. + + Invalid session tokens happen for these cases: + a) there are multiple sessions (different machines, different browsers) + open for same user. the user then changes the password in one of + these, which creates a new session key in the profile also, which + invalidates all sessions everywhere else for this user. + b) the user profile is gone (e.g. due to erasing the storage), then + a invalid session key will be read from the profile (from cfg.user_defaults) + that will never validate against the session key read from the + session. + """ # Ignore timeout, it's already handled by session cookie and session key should never timeout. return valid_token(self.profile[SESSION_KEY], token, None)
--- a/docs/admin/backup.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/admin/backup.rst Thu Apr 04 17:25:26 2013 +0530 @@ -19,7 +19,7 @@ * your data * moin configuration, e.g. wikiconfig.py * logging configuration, e.g. logging.conf -* moin script, e.g. moin.wsgi +* moin deployment script, e.g. moin.wsgi * web server configuration, e.g. apache virtualhost config * optional: moin code + dependencies; you should at least know which version you ran, so you can reinstall that version when you need to restore @@ -38,8 +38,8 @@ To restore all software and configuration files to their original place, create an empty wiki first:: - moin moin -s -i # -s = create new storage - # -i = create new index + moin index-create -s -i # -s = create new storage + # -i = create new index To load the backup file into your empty wiki, run::
--- a/docs/admin/changes.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/admin/changes.rst Thu Apr 04 17:25:26 2013 +0530 @@ -1,6 +1,6 @@ :tocdepth: 2 -.. _changes:: +.. _changes: Changes in MoinMoin ===================
--- a/docs/admin/configure.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/admin/configure.rst Thu Apr 04 17:25:26 2013 +0530 @@ -47,7 +47,7 @@ Why use Python for configuration? --------------------------------- At first, you might wonder why we use Python code for configuration. One of the -reasons is that it is a powerful language. Moinmoin itself is developed in Python +reasons is that it is a powerful language. MoinMoin itself is developed in Python and using something else would usually mean much more work when developing new functionality. @@ -68,7 +68,7 @@ MOINCFG = Config # Flask only likes uppercase characters SOMETHING_FLASKY = 'foobar' -Let's go through this line-by-line:: +Let's go through this line-by-line: 0. this declares the encoding of the config file; make sure your editor uses the same encoding (character set), especially if you intend to use non-ASCII @@ -276,6 +276,9 @@ * `jquery_file_upload <http://pypi.python.org/pypi/XStatic-jQuery-File-Upload>`_ loaded in the template file of index view. It allows to upload many files at once. +* `JSON-js <http://pypi.python.org/pypi/XStatic-JSON-js>`_ + JSON encoders/decoders in JavaScript. + * `ckeditor <http://pypi.python.org/pypi/XStatic-CKEditor>`_ used in template file modify_text_html. A WYSIWYG editor similar to word processing desktop editing applications. @@ -294,16 +297,13 @@ a Java applet loaded from template file of modify_anywikidraw. It can be used for editing drawings and diagrams on items. -* `jquery_multi_download <http://pypi.python.org/pypi/XStatic-multiDownload>`_ - used in the template of index view for multiple parallel downloads. - These packages are imported in wikiconfig by:: from xstatic.main import XStatic mod_names = ['jquery', 'jquery_file_upload', 'ckeditor', 'svgweb', 'svgedit_moin', 'twikidraw_moin', - 'anywikidraw', 'jquery_multi_download', ] + 'anywikidraw', ] pkg = __import__('xstatic.pkg', fromlist=mod_names) for mod_name in mod_names: mod = getattr(pkg, mod_name) @@ -649,6 +649,7 @@ default is this: :: + passlib_crypt_context = dict( schemes=["sha512_crypt", ], ) @@ -791,7 +792,7 @@ * As a consequence of the left-to-right and first-match-counts processing, you must order ACL entries so that the more specific ones (like for "SuperMan") are left of the less specific ones. - Usually, you want this order:: + Usually, you want this order: 1) usernames 2) special groups @@ -1015,9 +1016,8 @@ Setup of storage is rather complex and layered, involving: -* a router middleware that dispatches parts of the namespace to the respective - backend -* ACL checking middlewares that make sure nobody accesses something he/she is not +* Routing middleware that dispatches by namespace to the respective backend +* ACL checking middleware that makes sure nobody accesses something he/she is not authorized to access * Indexing mixin that indexes some data automatically on commit, so items can be selected / retrieved faster. @@ -1027,54 +1027,55 @@ --------------------- This is a helper function to make storage setup easier. It helps you to: -* create a simple setup that uses 3 storage backends internally for these - parts of the namespace: +* create a simple setup that uses 2 storage backends internally for these + namespaces: - - content + - default - userprofiles -* configure ACLs protecting these parts of the namespace -* setup a router middleware that dispatches to these parts of the namespace +* configure ACLs protecting these namespaces +* setup a router middleware that dispatches to these backends * setup a indexing mixin that maintains an index Call it as follows:: from MoinMoin.storage import create_simple_mapping - namespace_mapping, acl_mapping = create_simple_mapping( + namespace_mapping, backend_mapping, acl_mapping = create_simple_mapping( uri=..., - content_acl=dict(before=..., + default_acl=dict(before=..., default=..., after=..., hierarchic=..., ), - user_profile_acl=dict(before=..., + userprofiles_acl=dict(before=..., default=..., - after=..., ), + after=..., + hierarchiv=False, ), ) The `uri` depends on the kind of storage backend and stores you want to use, see below. Usually it is a URL-like string in the form of:: - stores:fs:/srv/mywiki/%(nsname)s/%(kind)s - + stores:fs:/srv/mywiki/%(backend)s/%(kind)s + `stores` is the name of the backend, followed by a colon, followed by a store -specification. `fs` is the name of the store, followed by a specification +specification. `fs` is the type of the store, followed by a specification that makes sense for the fs (filesystem) store, i.e. a path with placeholders. -`%(nsname)s` placeholder will be replaced 'content' or 'userprofiles' for +`%(backend)s` placeholder will be replaced by 'default' or 'userprofiles' for the respective backend. `%(kind)s` will be replaced by 'meta' or 'data' later. In this case, the mapping created will look like this: +----------------+-----------------------------+ -| Namespace part | Filesystem path for storage | +| Namespace | Filesystem path for storage | +----------------+-----------------------------+ -| / | /srv/mywiki/content/ | +| default | /srv/mywiki/default/ | +----------------+-----------------------------+ -| /UserProfiles/ | /srv/mywiki/userprofiles/ | +| userprofiles | /srv/mywiki/userprofiles/ | +----------------+-----------------------------+ -`content_acl` and `user_profile_acl` are dictionaries specifying the ACLs for +`default_acl` and `userprofiles_acl` are dictionaries specifying the ACLs for this part of the namespace (normal content, user profiles). See the docs about ACLs. @@ -1091,8 +1092,7 @@ ------------------ Features: -* dispatches storage access to different backends depending on the item name -* in POSIX terms, it is something like fstab/mount +* dispatches storage access to different backends depending on the namespace * if you use create_simple_mapping, the router middleware will be set up automatically by moin. @@ -1123,10 +1123,10 @@ data_dir = '/srv/mywiki/data' namespace_mapping, acl_mapping = create_simple_mapping( uri='stores:fs:{0}/%(nsname)s/%(kind)s'.format(data_dir), - content_acl=dict(before=u'WikiAdmin:read,write,create,destroy', + default_acl=dict(before=u'WikiAdmin:read,write,create,destroy', default=u'All:read,write,create', after=u'', ), - user_profile_acl=dict(before=u'WikiAdmin:read,write,create,destroy', + userprofiles_acl=dict(before=u'WikiAdmin:read,write,create,destroy', default=u'', after=u'', ), ) @@ -1220,6 +1220,15 @@ add kt store configuration example +mongodb store +------------- +Features: + +* uses mongodb for storage + +.. todo: + + add mongodb store configuration example memory store -------------- @@ -1324,7 +1333,7 @@ Logging is very configurable and flexible due to the use of the `logging` module of the Python standard library. -The configuration file format is described there:: +The configuration file format is described there: http://www.python.org/doc/current/library/logging.html#configuring-logging @@ -1339,7 +1348,7 @@ log.load_config('wiki/config/logging/logfile') You have to fix that path to use a logging configuration matching your -needs. +needs (use an absolute path). Please note that the logging configuration has to be a separate file, so don't try this in your wiki configuration file!
--- a/docs/admin/install.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/admin/install.rst Thu Apr 04 17:25:26 2013 +0530 @@ -133,10 +133,12 @@ moin index-build -Installing PIL -~~~~~~~~~~~~~~ +Installing PIL / pillow +~~~~~~~~~~~~~~~~~~~~~~~ For some image processing functions that MoinMoin uses like resizing and rotating, -you need PIL, which is the Python Imaging Library. +you need PIL, which is the Python Imaging Library (sometimes also referred to as +python-imaging). Instead of PIL, you can also use pillow, which is a compatible +fork of PIL (with more active maintenance and it also has been ported to Python 3). Windows users who want to install PIL should skip the remainder of this section and read Troubleshooting -- PIL Installation Under Windows below. @@ -151,7 +153,12 @@ Now activate your virtual environment and install PIL into it:: - pip install pil # for Linux or other POSIX OSes + pip install pil # for Linux (or other POSIX OSes) + +Alternatively, if you prefer to use pillow:: + + pip install pillow # for Linux (or other POSIX OSes) + Troubleshooting --------------- @@ -202,8 +209,8 @@ Repeat these steps until you don't see fatal errors. -PIL Installation Under Windows -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PIL/pillow Installation Under Windows +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PIL version 1.1.7 does not install correctly via "pip install pil" on Windows. Some users have had success using "pip install pillow", a fork of PIL fixing a packaging issue. Other users have resorted to installing PIL 1.1.6 in the
--- a/docs/devel/api/MoinMoin.constants.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/devel/api/MoinMoin.constants.rst Thu Apr 04 17:25:26 2013 +0530 @@ -25,6 +25,22 @@ :undoc-members: :show-inheritance: +:mod:`forms` Module +------------------- + +.. automodule:: MoinMoin.constants.forms + :members: + :undoc-members: + :show-inheritance: + +:mod:`itemtypes` Module +----------------------- + +.. automodule:: MoinMoin.constants.itemtypes + :members: + :undoc-members: + :show-inheritance: + :mod:`keys` Module ------------------ @@ -41,6 +57,14 @@ :undoc-members: :show-inheritance: +:mod:`namespaces` Module +------------------------ + +.. automodule:: MoinMoin.constants.namespaces + :members: + :undoc-members: + :show-inheritance: + :mod:`rights` Module --------------------
--- a/docs/devel/api/MoinMoin.converter.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/devel/api/MoinMoin.converter.rst Thu Apr 04 17:25:26 2013 +0530 @@ -153,6 +153,14 @@ :undoc-members: :show-inheritance: +:mod:`markdown_in` Module +------------------------- + +.. automodule:: MoinMoin.converter.markdown_in + :members: + :undoc-members: + :show-inheritance: + :mod:`mediawiki_in` Module --------------------------
--- a/docs/devel/api/MoinMoin.items.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/devel/api/MoinMoin.items.rst Thu Apr 04 17:25:26 2013 +0530 @@ -9,3 +9,27 @@ :undoc-members: :show-inheritance: +:mod:`blog` Module +------------------ + +.. automodule:: MoinMoin.items.blog + :members: + :undoc-members: + :show-inheritance: + +:mod:`content` Module +--------------------- + +.. automodule:: MoinMoin.items.content + :members: + :undoc-members: + :show-inheritance: + +:mod:`ticket` Module +-------------------- + +.. automodule:: MoinMoin.items.ticket + :members: + :undoc-members: + :show-inheritance: +
--- a/docs/devel/api/MoinMoin.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/devel/api/MoinMoin.rst Thu Apr 04 17:25:26 2013 +0530 @@ -41,6 +41,14 @@ :undoc-members: :show-inheritance: +:mod:`forms` Module +------------------- + +.. automodule:: MoinMoin.forms + :members: + :undoc-members: + :show-inheritance: + :mod:`log` Module -----------------
--- a/docs/devel/api/MoinMoin.script.maint.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/devel/api/MoinMoin.script.maint.rst Thu Apr 04 17:25:26 2013 +0530 @@ -17,14 +17,6 @@ :undoc-members: :show-inheritance: -:mod:`modified_systemitems` Module ----------------------------------- - -.. automodule:: MoinMoin.script.maint.modified_systemitems - :members: - :undoc-members: - :show-inheritance: - :mod:`modify_item` Module -------------------------
--- a/docs/devel/api/MoinMoin.storage.stores.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/devel/api/MoinMoin.storage.stores.rst Thu Apr 04 17:25:26 2013 +0530 @@ -41,6 +41,14 @@ :undoc-members: :show-inheritance: +:mod:`mongodb` Module +--------------------- + +.. automodule:: MoinMoin.storage.stores.mongodb + :members: + :undoc-members: + :show-inheritance: + :mod:`sqla` Module ------------------
--- a/docs/devel/api/MoinMoin.util.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/devel/api/MoinMoin.util.rst Thu Apr 04 17:25:26 2013 +0530 @@ -9,6 +9,14 @@ :undoc-members: :show-inheritance: +:mod:`StringIOClosing` Module +----------------------------- + +.. automodule:: MoinMoin.util.StringIOClosing + :members: + :undoc-members: + :show-inheritance: + :mod:`SubProcess` Module ------------------------ @@ -89,22 +97,6 @@ :undoc-members: :show-inheritance: -:mod:`lock` Module ------------------- - -.. automodule:: MoinMoin.util.lock - :members: - :undoc-members: - :show-inheritance: - -:mod:`md5crypt` Module ----------------------- - -.. automodule:: MoinMoin.util.md5crypt - :members: - :undoc-members: - :show-inheritance: - :mod:`mime` Module ------------------
--- a/docs/devel/development.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/devel/development.rst Thu Apr 04 17:25:26 2013 +0530 @@ -154,7 +154,7 @@ * EmeraldTree for xml and tree processing * blinker for signalling * pygments for syntax highlighting -* for stores: filesystem, sqlite3, sqlalchemy, kyoto cabinet/tycoon, memory +* for stores: filesystem, sqlite3, sqlalchemy, kyoto cabinet/tycoon, mongodb, memory * jquery javascript lib * CKeditor, the GUI editor for (x)html * TWikiDraw, AnyWikiDraw, svgdraw drawing tools @@ -228,7 +228,7 @@ Above that, there is miscellaneous functionality in `MoinMoin.storage.middleware` for: -* routing by name to some specific backend, like fstab / mount +* routing by namespace to some specific backend * indexing metadata and data + comfortable and fast index-based access, selection and search * protecting items by ACLs (Access Control Lists)
--- a/docs/index.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/index.rst Thu Apr 04 17:25:26 2013 +0530 @@ -13,6 +13,7 @@ intro/general intro/features + intro/license Using MoinMoin ============== @@ -21,7 +22,6 @@ :maxdepth: 2 user/accounts - user/searching user/markups user/search
--- a/docs/intro/features.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/intro/features.rst Thu Apr 04 17:25:26 2013 +0530 @@ -75,6 +75,7 @@ * file system * sql database, such as sqlite3 or everything supported by SQLalchemy * Kyoto Tycoon / Kyoto Cabinet +* mongodb * you can easily add your own backend with little code Serialization @@ -127,6 +128,7 @@ * MediaWiki * reST * DocBook XML +* Markdown * HTML * plus code / text file highlighting for many formats
--- a/docs/intro/general.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/intro/general.rst Thu Apr 04 17:25:26 2013 +0530 @@ -70,7 +70,7 @@ Who is using MoinMoin? ---------------------- -This shows some of the better-known users of MoinMoin:: +This shows some of the better-known users of MoinMoin: Web Sites ~~~~~~~~~~~~~~
--- a/docs/intro/license.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/intro/license.rst Thu Apr 04 17:25:26 2013 +0530 @@ -1,6 +1,8 @@ -:orphan: +.. _license: -.. _license: +======= +License +======= .. literalinclude:: ../../LICENSE.txt
--- a/docs/man/moin.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/man/moin.rst Thu Apr 04 17:25:26 2013 +0530 @@ -12,7 +12,7 @@ Description ----------- -:program:`moin` is the command line interface to miscellaneous moin-related tools. +:program:`moin` is the command line interface to miscellaneous MoinMoin Wiki related tools. If you invoke :program:`moin` without any arguments, it will start the builtin server and you'll have moin running! This is a shortcut for @@ -23,13 +23,6 @@ :program:`moin <subcommand> --help` will give help for some subcommand. -Options -------- - -.. todo:: - - Describe moin command line options. - See also --------
--- a/docs/user/accounts.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/user/accounts.rst Thu Apr 04 17:25:26 2013 +0530 @@ -58,9 +58,9 @@ Name Your username, as it will appear on the wiki and in the history pages of wiki items which you edit. -Alias-Name - The alias name can be used to override your username, so you will still log in using your username - but your alias name will be displayed to other users and in your history page. +Display-Name + The display name can be used to override your username, so you will still log in using your username + but your display name will be displayed to other users and in your history page. OpenID If you have an OpenID which you would like to associate with your account, enter it here. @@ -157,10 +157,6 @@ Your User Page -------------- -.. warning:: - **MOINTODO** User pages are currently broken as they have no handler for their content type. Because - of this, they use the binary content type and cannot be viewed (they must be downloaded). - You user page is a wiki space in which you may share information about yourself with other users of that wiki. It can be accessed by clicking the button with your username on it at the top of the screen, and is edited like a normal wiki item. @@ -168,11 +164,8 @@ "My Changes" ------------ -To view your modifications to a wiki, navigate to the URL ``/+mychanges``. This will show a list of -modifications you have made to wiki items. - -.. warning:: - **MOINTODO** There is currently no button to get to +mychanges. This should be fixed. +To view your modifications to a wiki, click on ``User`` in the navigation area, then on ``My Changes``. + his will show a list of modifications you have made to wiki items. **MOINTODO** +mychanges only links to the item which you edit, not the specific revision. If you edit and item several times, it just inserts several identical links to that item. This behaviour should be
--- a/docs/user/docbook.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/user/docbook.rst Thu Apr 04 17:25:26 2013 +0530 @@ -2,3 +2,5 @@ Docbook XML Markup ================== +.. warning:: + **MOINTODO** fill this page with useful content (see other markup related pages about how it should look like)
--- a/docs/user/markdown.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/user/markdown.rst Thu Apr 04 17:25:26 2013 +0530 @@ -2,3 +2,5 @@ Markdown Markup =============== +.. warning:: + **MOINTODO** fill this page with useful content (see other markup related pages about how it should look like)
--- a/docs/user/markups.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/user/markups.rst Thu Apr 04 17:25:26 2013 +0530 @@ -10,16 +10,19 @@ rest docbook mediawiki + markdown .. _MoinWiki: http://moinmo.in/HelpOnMoinWikiSyntax .. _WikiCreole: http://www.wikicreole.org/ .. _reStructuredText: http://docutils.sourceforge.net/rst.html .. _Docbook: http://www.docbook.org/ .. _MediaWiki: http://www.mediawiki.org/wiki/Help:Formatting +.. _Markdown: http://daringfireball.net/projects/markdown/syntax In Moin2, you specify the item's markup language when you create the document. Its markup language can also be changed at any time by modifying the item's ``contenttype`` metadata. -Currently Moin2 supports `MoinWiki`_, `WikiCreole`_, `reStructuredText`_, `Docbook`_ and `MediaWiki`_ markups. +Currently Moin2 supports `MoinWiki`_, `WikiCreole`_, `reStructuredText`_, `Docbook`_, +`MediaWiki`_ and `Markdown`_ markups. **MOINTODO**: Currently the use of ``{{{#!syntax content}}}`` parsers crashes moin. This should be looked into.
--- a/docs/user/search.rst Thu Apr 04 17:12:43 2013 +0530 +++ b/docs/user/search.rst Thu Apr 04 17:25:26 2013 +0530 @@ -167,7 +167,7 @@ ===== moin uses indexed search. Keep in mind that this has some special properties: - * By using an index, the search is rather usually fast + * By using an index, the search is usually rather fast * Because it is only using an index, it can only find what was put there * If you use wildcards or regexes, it will still use the index, but in a different, slower way
--- a/setup.cfg Thu Apr 04 17:12:43 2013 +0530 +++ b/setup.cfg Thu Apr 04 17:25:26 2013 +0530 @@ -43,7 +43,7 @@ # Note: we need pytest-pep8 >= 1.0.4 to make pep8maxlinelength work, but that # needs a pytest >= 2.3, so, we can't use that until our test work with that. #pep8maxlinelength = 120 -norecursedirs = .hg _build tmp* env* dlc wiki +norecursedirs = .hg _build tmp* env* dlc wiki support minversion = 2.0 pep8ignore = *.py E124 # closing bracket does not match visual indentation (behaves strange!?)
--- a/setup.py Thu Apr 04 17:12:43 2013 +0530 +++ b/setup.py Thu Apr 04 17:25:26 2013 +0530 @@ -123,6 +123,7 @@ # PIL is a binary dependency and some features of it # require special libs/header to be installed before # it can be compiled successfully + 'pillow': ["pillow"], # alternative to PIL 'ldap': ["python-ldap>=2.0.0"], # used by ldap auth 'openid': ["python-openid>=2.2.4"], # used by openid rp auth 'sqla': ["sqlalchemy>=0.7.1"], # used by sqla store
--- a/wikiconfig.py Thu Apr 04 17:12:43 2013 +0530 +++ b/wikiconfig.py Thu Apr 04 17:25:26 2013 +0530 @@ -34,11 +34,11 @@ namespace_mapping, backend_mapping, acl_mapping = create_simple_mapping( uri='stores:fs:{0}/%(backend)s/%(kind)s'.format(data_dir), # XXX we use rather relaxed ACLs for the development wiki: - content_acl=dict(before=u'', + default_acl=dict(before=u'', default=u'All:read,write,create,destroy,admin', after=u'', hierarchic=False, ), - user_profile_acl=dict(before=u'', + userprofiles_acl=dict(before=u'', default=u'All:read,write,create,destroy,admin', after=u'', hierarchic=False, ),
