Mercurial > moin-2.0
changeset 2074:dc2749d23960
merged
| author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
|---|---|
| date | Tue, 02 Apr 2013 00:30:23 +0200 |
| parents | a451feb5e0d0 (current diff) ab2421ef4897 (diff) |
| children | 1d8366403411 |
| files | MoinMoin/config/default.py MoinMoin/storage/middleware/indexing.py |
| diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/config/default.py Sun Mar 31 23:12:04 2013 -0400 +++ b/MoinMoin/config/default.py Tue Apr 02 00:30:23 2013 +0200 @@ -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, (
--- a/MoinMoin/storage/middleware/indexing.py Sun Mar 31 23:12:04 2013 -0400 +++ b/MoinMoin/storage/middleware/indexing.py Tue Apr 02 00:30:23 2013 +0200 @@ -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: + print "SKIPPING", meta[NAME] + return u'' + if not item_name: item_name = get_names(meta)[0]
