Skip to content

pyramid_layout breaks view lookup  #33

@tonthon

Description

@tonthon

When using pyramid_layout with a non default layout, the request_param view predicates is not matched anymore.

Starting with the demo app, add following lines in views.py

@view_config(                                                                    
    route_name='home.mako',                                                    
    request_param='view=html',                                                   
    renderer='demo:templates/home2.mako',                                      
)                                             
@view_config(                                                                    
    route_name='home.jinja2',                                                    
    request_param='view=html',                                                   
    renderer='demo:templates/home2.jinja2',                                      
)                                                                                
def home2(request):                                                              
    return {}  

Add a home2.mako and a home2.jinja2 in the demo/templates directory

<div>It works</div>

Restart the demo server

If you go to
http://0.0.0.0:6543/?view=html
you get the expected 'It works' text.

If you go to
http://0.0.0.0:6543/home.jinja2?view=html
You fill on the home page and not on the expected one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions