7 ms·
Bottle and Flask actually allow for this too. Bottle's variant: @route('/hello/:name', method='GET') def hello_get(name): return 'Hello %s' % nam
by mcdonc 15y ago
Bottle and Flask actually allow for this too. Bottle's variant:
@route('/hello/:name', method='GET')
def hello_get(name):
return 'Hello %s' % name
@route('/hello/:name', method='POST')
def hello_post(name):
return 'Hello %s' % name
Pyramid permits a larger variety of predicates (including custom ones), however: https://docs.pylonsproject.org/projects/pyramid/1.2/narr/viewconfig.html#predicate-arguments https://docs.pylonsproject.org/projects/pyramid/1.2/narr/vie...
- mmerickel 15y agoYes but while implicit route ordering works a lot of the time, I'll gladly keep Pyramid's concept of explicit ordering, which is the main source of verbosity in the Pyramid setup which separates routes from views.
- mcdonc 15y agoThe order the decorators are run at import time is explicit. Everybody loves module-scope programming and import-time side-effects! What's wrong with you man? ;-)