Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Avoid re-executing the same view when looking up context base views. #1046
Yes, the specification resolution order means it's only interesting to look at the previous callable. Example:
Given a context with class C. The view first view lookup will return viewB which might be disallowed due to a permission check. The next view lookup will be on specification B, returning the same viewB.
Feel free to throw that into a cookbook recipe. I think it's dangerous to add it to pyramid's core as permissions have no inherent ordering and therefore requires you to think carefully about what permissions you specify on a collection of views. However some people would find it useful.
added a commit
this pull request
Jul 16, 2013
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
@mmerickel they're for views registered in addition to another view. For instance, displaying more information on a user's profile to that user and admins: https://github.com/ENCODE-DCC/encoded/blob/f8cb65b27292ed06396609f414343204aed7d5e6/src/encoded/views/user.py#L57