-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate view arguments in add_route #164
Comments
I'll admit that I'm actually somewhat in favor of this, as I've seen people add a dozen add_route statements with the same route_name and url segment, and they're using it to actually add additional views with different predicates for the same route. While at first I thought maybe just the documentation should show add_route followed by an add_view, it then seems odd to explain, "and now to confuse you, lets mix one of the views for this route into the add_route statement, but keep all the additional views for this route in separate statements....". Such docs has me agreeing more with you on documenting them separately to help emphasize that adding a view for a route_name with some predicates (or not) is separate from setting up the routes. The current method of using add_route to add the route and view clearly has people believing there's a closer binding between the route+view than actually exists thus the repeat add_route calls with the same name+path but different view args. |
raydeo's fork was merged into master via 1612fe7 |
Pretty please? The idea was nice but I think has 2 problems:
add_view
or@view_config
.@view_config
oradd_view
.Pyramid could deprecate the usage of those arguments, possibly by removing them from the documentation (or putting a nice big warning in the docs) and issuing a warning when they are used.
The text was updated successfully, but these errors were encountered: