Task #4185
closed
[pyramid] switch routing to be fully pyramid only
Added by Marcin Kuzminski [CTO] over 8 years ago.
Updated over 6 years ago.
Estimated time:
(Total: 0.00 h)
Description
We need to start moving the code back to pyramid. We should start with making routes work only in PYRAMID, if that's possible.
- need to investigate if we can make it work
- we should have a one common place to define those like we had before
- can we support pylons DELETE/PUT fake request mapping, or should we re-do all the routes not to use them (it's really a POST faked by special parameter to mimic DELETE/PUT)
One issue with moving urls to pyramid is that generating urls for tests can't use the url generator.
You can't use request.route_path('someroute')
unless there is a request context - which means the tests would have to be done as:
url = ADMIN_PREFIX + '/some/route/' + str(id)
vs
url = request.route_path('someroute', id=id)
Although this might be good in actually finding route changing mistakes.
We can add middleware to support the fake _method arg, but it's a better idea to use POST/GET's for everything, since web browsers only support that and the endpoints are not actually REST in the end.
Yes, firstly we should remove all DELETE/UPDATE/PUT fake calls.
- probably already needs route changing and matching
as for ADMIN prefix, there for sure must be a way to generate urls for tests.
- Target version changed from v4.4 to v4.5
- Target version changed from v4.5 to v4.6
- Target version changed from v4.6 to v4.7
- Target version changed from v4.7 to v5.0
- Status changed from New to Closed
Also available in: Atom
PDF