[PATCH saem] [ui/patches] Move most pagination related monkey-patches to views

Denis Laxalde denis.laxalde at logilab.fr
Fri May 19 10:54:28 CEST 2017


Sylvain Thénault a écrit :
>
> Le 19/05/2017 à 09:29, Denis Laxalde a écrit :
>> Sylvain Thenault a écrit :
>>> # HG changeset patch
>>> # User Sylvain Thénault <sylvain.thenault at logilab.fr>
>>> # Date 1495121557 -7200
>>> #      Thu May 18 17:32:37 2017 +0200
>>> # Node ID 0d138d03ca4dd1e8d822e280f3c343a4971eac4a
>>> # Parent  7aca90bfbdf3aae98f434400e1368428443441bf
>>> # Available At http://hg.logilab.org/review/cubes/saem_ref
>>> #              hg pull http://hg.logilab.org/review/cubes/saem_ref -r
>>> 0d138d03ca4d
>>> [ui/patches] Move most pagination related monkey-patches to views
>>>
>>> Those are patching appobject, hence should not live in site_cubicweb
>>> since this
>>> module is loaded once at startup time while appobjects are loaded
>>> dynamically
>>> afterwards.
>>>
>>> In our case, our monkey-patch was later overwritten by some others
>>> from the
>>> squareui cube, leading to weird behaviour of the pagination.
>>>
>>> Closes extranet #21942222
>>>
>>> diff --git a/cubicweb_saem_ref/views/patches.py
>>> b/cubicweb_saem_ref/views/patches.py
>>> --- a/cubicweb_saem_ref/views/patches.py
>>> +++ b/cubicweb_saem_ref/views/patches.py
>>> @@ -41,5 +41,87 @@ def render(self, registry, oid, eid=None
>>>
>>>
>>>  def registration_callback(vreg):
>>>      vreg.register_all(globals().values(), __name__, (render,))
>>>      vreg.register_and_replace(render, ajaxcontroller.render)
>> Looks strange to have registration_callback defined in the middle of the
>> file. Could you keep it at the end?
>> I can do this while applying if this okay for you.
> please do, this was done inadvertently.
>

Ok, applied.



More information about the saem-devel mailing list