Many thanks, it works perfectly !!

Best regards,
Thierry

2018-02-28 17:42 GMT+01:00 Michael Merickel <[email protected]>:

> https://docs.pylonsproject.org/projects/pyramid/en/
> latest/narr/advconfig.html#automatic-conflict-resolution
>
> Basically if each view is registered from some call within a
> config.include'd function then if you establish an appropriate
> include-chain then you can override one call from the other.
>
> def include_orig(config):
>     config.scan('.orig_pkg')
>
> def include_override(config):
>     config.include(include_orig)
>     config.scan('.override_pkg')
>
> def main(...):
>     # do not config.include(include_orig) here, instead include the
> override
>     # otherwise they would be siblings and thus no clear chain
>
>     config.include(include_override)
>
> Now pyramid will have a chain that says specifically that the override is
> "closer" to your main than orig and thus its directives should win.
>
> - Michael
>
>
> On Wed, Feb 28, 2018 at 4:50 AM, Thierry Florac <[email protected]> wrote:
>
>> Hi,
>> I created a view in a first package.
>> In another package (which is an optional extension of the first one), I
>> need to create another view but with the same name and the same settings as
>> the previous one but with another class which inherits from the first one.
>> By default, this raises a "pyramid.exceptions.ConfigurationConflictError"
>> exception: Conflicting configuration actions!
>> So how can I "override" or "replace" a view declaration? Eventually, can
>> I "unregister" a view declaration before registering the new one?
>>
>> Best regards,
>> T. Florac
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pylons-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/pylons-discuss/CAPX_VWDmDJKT5g3j8%3Dx7BW9mWuiYk1Z1rz9BTw
>> zGxKy8Fxz2kA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/pylons-discuss/CAPX_VWDmDJKT5g3j8%3Dx7BW9mWuiYk1Z1rz9BTwzGxKy8Fxz2kA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/pylons-discuss/CAKdhhwHenweaeWuw-U6cpk4AQWCDGFZGgzAhE_AkHg_-
> nhtPiA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwHenweaeWuw-U6cpk4AQWCDGFZGgzAhE_AkHg_-nhtPiA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
http://www.imagesdusport.com -- http://www.ztfy.org

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/CAPX_VWAQJBYvPJmOVCt%3DE6pgiJD_Cc0htJ6Tq%3D8Z%3DwKT6b_3fA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to