Commits

Thomas Waldmann  committed dc2749d Merge

merged

  • Participants
  • Parent commits a451feb, ab2421e

Comments (0)

Files changed (2)

File MoinMoin/config/default.py

         ('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, (

File MoinMoin/storage/middleware/indexing.py

         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]