Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

proutes shows <unknown> for views added with context #3603

Closed
drnextgis opened this issue Jul 9, 2020 · 3 comments
Closed

proutes shows <unknown> for views added with context #3603

drnextgis opened this issue Jul 9, 2020 · 3 comments

Comments

@drnextgis
Copy link
Contributor

drnextgis commented Jul 9, 2020

In case when add_view is called with context parameter proutes shows view as <unknown>. See detailed example here.

Name           Pattern         View         Method    
----           -------         ----         ------    
dummy.route    /dummy/route    <unknown>    * 
@digitalresistor
Copy link
Member

Linked Stack Overflow issue says this was an issue with understanding the proutes output.

@drnextgis
Copy link
Contributor Author

drnextgis commented Jul 13, 2020

If proutes shows distinct records for different http methods, wouldn't it make sense to do the same for context?

@mmerickel
Copy link
Member

I think that from Pyramid's perspective the matching view here really is "unknown" and not inaccurate. However, I think the code in proutes could potentially be doing more work to provide useful output.

For example, while the "View" is unknown, it is known which views could potentially be invoked, assuming use_global_views is False. It seems reasonable to provide a way to see those views and their predicate values if anyone wanted to get into those details. Right now it's only showing the request method predicate, and it could be extended to show a lot more.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants