|
|
@ -10,7 +10,6 @@ |
|
|
|
:license: BSD, see LICENSE for more details. |
|
|
|
:license: BSD, see LICENSE for more details. |
|
|
|
""" |
|
|
|
""" |
|
|
|
from __future__ import with_statement |
|
|
|
from __future__ import with_statement |
|
|
|
import re |
|
|
|
|
|
|
|
import os |
|
|
|
import os |
|
|
|
import sys |
|
|
|
import sys |
|
|
|
|
|
|
|
|
|
|
@ -261,7 +260,7 @@ def _default_template_ctx_processor(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _assert_have_json(): |
|
|
|
def _assert_have_json(): |
|
|
|
"""Helper function that fails if JSON is unavailable""" |
|
|
|
"""Helper function that fails if JSON is unavailable.""" |
|
|
|
if not json_available: |
|
|
|
if not json_available: |
|
|
|
raise RuntimeError('simplejson not installed') |
|
|
|
raise RuntimeError('simplejson not installed') |
|
|
|
|
|
|
|
|
|
|
@ -544,7 +543,7 @@ class Flask(object): |
|
|
|
:param endpoint: the endpoint for the registered URL rule. Flask |
|
|
|
:param endpoint: the endpoint for the registered URL rule. Flask |
|
|
|
itself assumes the name of the view function as |
|
|
|
itself assumes the name of the view function as |
|
|
|
endpoint |
|
|
|
endpoint |
|
|
|
:param view_func: the function to call when servicing a request to the |
|
|
|
:param view_func: the function to call when serving a request to the |
|
|
|
provided endpoint |
|
|
|
provided endpoint |
|
|
|
:param options: the options to be forwarded to the underlying |
|
|
|
:param options: the options to be forwarded to the underlying |
|
|
|
:class:`~werkzeug.routing.Rule` object |
|
|
|
:class:`~werkzeug.routing.Rule` object |
|
|
@ -798,7 +797,7 @@ class Flask(object): |
|
|
|
return self.request_context(create_environ(*args, **kwargs)) |
|
|
|
return self.request_context(create_environ(*args, **kwargs)) |
|
|
|
|
|
|
|
|
|
|
|
def __call__(self, environ, start_response): |
|
|
|
def __call__(self, environ, start_response): |
|
|
|
"""Shortcut for :attr:`wsgi_app`""" |
|
|
|
"""Shortcut for :attr:`wsgi_app`.""" |
|
|
|
return self.wsgi_app(environ, start_response) |
|
|
|
return self.wsgi_app(environ, start_response) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|