Skip to content

Commit

Permalink
Merge pull request #2616 from m-martinez/issue-2609
Browse files Browse the repository at this point in the history
Add route name to view deriver options. Closes: #2609
  • Loading branch information
mmerickel committed Jun 2, 2016
2 parents 382f93e + 5c0c7c6 commit 281a670
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,5 @@ Contributors
- Vincent Férotin, 2016/05/08

- Berker Peksag, 2016/05/16

- Marco Martinez, 2016/06/02
4 changes: 3 additions & 1 deletion pyramid/config/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ def register(permission=permission, renderer=renderer):
# __no_permission_required__ handled by _secure_view
derived_view = self._derive_view(
view,
route_name=route_name,
permission=permission,
predicates=preds,
attr=attr,
Expand Down Expand Up @@ -1331,7 +1332,7 @@ def my_wrapper(context, request):
def _derive_view(self, view, permission=None, predicates=(),
attr=None, renderer=None, wrapper_viewname=None,
viewname=None, accept=None, order=MAX_ORDER,
phash=DEFAULT_PHASH, decorator=None,
phash=DEFAULT_PHASH, decorator=None, route_name=None,
mapper=None, http_cache=None, context=None,
require_csrf=None, extra_options=None):
view = self.maybe_dotted(view)
Expand Down Expand Up @@ -1361,6 +1362,7 @@ def _derive_view(self, view, permission=None, predicates=(),
decorator=decorator,
http_cache=http_cache,
require_csrf=require_csrf,
route_name=route_name
)
if extra_options:
options.update(extra_options)
Expand Down

0 comments on commit 281a670

Please sign in to comment.