extract common Flask/Blueprint API to Scaffold base class

Co-authored-by: Chris Nguyen <chrisngyn99@gmail.com>
This commit is contained in:
yk396 2020-07-22 15:02:31 -04:00 committed by David Lord
parent 216d97c21a
commit b146a13f63
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
5 changed files with 473 additions and 495 deletions

View file

@ -76,14 +76,6 @@ def get_load_dotenv(default=True):
return val.lower() in ("0", "false", "no")
def _endpoint_from_view_func(view_func):
"""Internal helper that returns the default endpoint for a given
function. This always is the function name.
"""
assert view_func is not None, "expected view func if endpoint is not provided."
return view_func.__name__
def stream_with_context(generator_or_function):
"""Request contexts disappear when the response is started on the server.
This is done for efficiency reasons and to make it less likely to encounter