Skip to content
Myr

Merge branch '2.0.x'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Adrian Moennich · committed by Adrian Moennich · parents 8e62bf6, 6e1b720 · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−3 removed

  • other:+3 added−3 removed

2 files+3 added−3 removed

modified:docs/views.rst+2 added-2 removed
111 unmodified lines
112------------------------113114For RESTful APIs it's especially helpful to execute a different function115for each HTTP method. With the :class:`flask.views.MethodView` you can116easily do that. Each HTTP method maps to a function with the same name117(just in lowercase)::116easily do that. Each HTTP method maps to a method of the class with the117same name (just in lowercase)::118119 from flask.views import MethodView120121 class UserAPI(MethodView):
114 unmodified lines
modified:src/flask/app.py+1 added-1 removed
1304 unmodified lines
1305 handlers.13061307 .. versionchanged:: 1.01308 Exceptions are looked up by code *and* by MRO, so1309 ``HTTPExcpetion`` subclasses can be handled with a catch-all1309 ``HTTPException`` subclasses can be handled with a catch-all1310 handler for the base ``HTTPException``.13111312 .. versionadded:: 0.31313 """
780 unmodified lines