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