1. 11 Mar, 2019 33 commits
  2. 21 Jan, 2019 2 commits
  3. 18 Jan, 2019 1 commit
    • Arnaud Fontaine's avatar
      ZODB Components: Optimize find_load_module() from b45914fa ExternalMethod optimization. · 8044598c
      Arnaud Fontaine authored
      This method is used to import ZODB Components when fallback on filesystem is needed
      and used when loading Document and Extension Components.
      
      1,000,000 executions:
        * Before:
          timeit("erp5.component.extension.find_load_module(module_name)",
                 setup="import erp5.component.extension; module_name='Hoge'")
          59.073
          59.324
        * b45914fa ExternalMethod optimization:
          timeit("__import__('erp5.component.extension.' + module_name, fromlist='*', level=0)",
                 setup="module_name='Hoge'")
          1.754
          1.845
        * This commit:
          timeit("import_module('erp5.component.extension.' + module_name)",
                 setup="from importlib import import_module; module_name='Hoge'")
          1.346
          1.311
          => Faster because import_module() calls __import__() without fromlist (not
             needed as it returns module from sys.modules after this) and level
             parameters.
          => Introduced in python3 and backported to python2.7. Recommended over
             __import__ in Python documentation for non-internal usage and when
             getting the module itself and not its top-level one.
      8044598c
  4. 17 Jan, 2019 2 commits
    • Jérome Perrin's avatar
      discussion: remove temporary hidden input added for click · 7aa5fb76
      Jérome Perrin authored
      When clicking "Reply" on a discussion post, this script adds a hidden input to mark which post we are replying to.
      This cause problem  when ctrl+clicking reply to reply in a new tab, because it leaves the page with the extra hidden input, which cause problems, like clicking reply again cause `Error Value: You are not allowed to access '['1', '1']`' in this context , or clicking change page will reply.
      
      This is a minimal effort fix, just remove the added element after click.
      
      /reviewed-on nexedi/erp5!823
      7aa5fb76
    • Jérome Perrin's avatar
      Revert "Show Id of template." · b3c56f2b
      Jérome Perrin authored
      This reverts commit b7d9590c.
      
      Users are not supposed to edit templates because documents are not in
      their "normal" context, if user edit templates some unexpected things
      might happen. We don't want user to change state or do some actions that
      may cause interactions on other documents from a template. This was
      never strongly enforced, but there was not supposed to be an easy way
      for users to access the template document.
      
      With old versions of ERP5 (before the rework of isIndexable /
      isSubTreeIndexable ), users could also add lines inside the template
      document and these lines where indexable.
      
      Note that the way of editing templates is:
       * make a "real" document from the template
       * modify this document
       * use "Make Template" again - this will replace the document with the
      same title.
      
      /reviewed-on nexedi/erp5!822
      b3c56f2b
  5. 16 Jan, 2019 2 commits