forked from orbit-oss/flask
Merge pull request #1000 from mikar/master
harmless comment fixes/typos
This commit is contained in:
commit
872094c556
5 changed files with 14 additions and 14 deletions
|
|
@ -25,7 +25,7 @@ except ImportError:
|
||||||
from itsdangerous import json as _json
|
from itsdangerous import json as _json
|
||||||
|
|
||||||
|
|
||||||
# figure out if simplejson escapes slashes. This behavior was changed
|
# Figure out if simplejson escapes slashes. This behavior was changed
|
||||||
# from one version to another without reason.
|
# from one version to another without reason.
|
||||||
_slash_escape = '\\/' not in _json.dumps('/')
|
_slash_escape = '\\/' not in _json.dumps('/')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ class SessionInterface(object):
|
||||||
|
|
||||||
def get_cookie_path(self, app):
|
def get_cookie_path(self, app):
|
||||||
"""Returns the path for which the cookie should be valid. The
|
"""Returns the path for which the cookie should be valid. The
|
||||||
default implementation uses the value from the SESSION_COOKIE_PATH``
|
default implementation uses the value from the ``SESSION_COOKIE_PATH``
|
||||||
config var if it's set, and falls back to ``APPLICATION_ROOT`` or
|
config var if it's set, and falls back to ``APPLICATION_ROOT`` or
|
||||||
uses ``/`` if it's `None`.
|
uses ``/`` if it's `None`.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,12 @@ except ImportError:
|
||||||
temporarily_connected_to = connected_to = _fail
|
temporarily_connected_to = connected_to = _fail
|
||||||
del _fail
|
del _fail
|
||||||
|
|
||||||
# the namespace for code signals. If you are not flask code, do
|
# The namespace for code signals. If you are not flask code, do
|
||||||
# not put signals in here. Create your own namespace instead.
|
# not put signals in here. Create your own namespace instead.
|
||||||
_signals = Namespace()
|
_signals = Namespace()
|
||||||
|
|
||||||
|
|
||||||
# core signals. For usage examples grep the sourcecode or consult
|
# Core signals. For usage examples grep the sourcecode or consult
|
||||||
# the API documentation in docs/api.rst as well as docs/signals.rst
|
# the API documentation in docs/api.rst as well as docs/signals.rst
|
||||||
template_rendered = _signals.signal('template-rendered')
|
template_rendered = _signals.signal('template-rendered')
|
||||||
request_started = _signals.signal('request-started')
|
request_started = _signals.signal('request-started')
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ class View(object):
|
||||||
for decorator in cls.decorators:
|
for decorator in cls.decorators:
|
||||||
view = decorator(view)
|
view = decorator(view)
|
||||||
|
|
||||||
# we attach the view class to the view function for two reasons:
|
# We attach the view class to the view function for two reasons:
|
||||||
# first of all it allows us to easily figure out what class-based
|
# first of all it allows us to easily figure out what class-based
|
||||||
# view this thing came from, secondly it's also used for instantiating
|
# view this thing came from, secondly it's also used for instantiating
|
||||||
# the view class so you can actually replace it with something else
|
# the view class so you can actually replace it with something else
|
||||||
|
|
@ -111,7 +111,7 @@ class MethodViewType(type):
|
||||||
for key in d:
|
for key in d:
|
||||||
if key in http_method_funcs:
|
if key in http_method_funcs:
|
||||||
methods.add(key.upper())
|
methods.add(key.upper())
|
||||||
# if we have no method at all in there we don't want to
|
# If we have no method at all in there we don't want to
|
||||||
# add a method list. (This is for instance the case for
|
# add a method list. (This is for instance the case for
|
||||||
# the baseclass or another subclass of a base method view
|
# the baseclass or another subclass of a base method view
|
||||||
# that does not introduce new methods).
|
# that does not introduce new methods).
|
||||||
|
|
@ -141,8 +141,8 @@ class MethodView(with_metaclass(MethodViewType, View)):
|
||||||
"""
|
"""
|
||||||
def dispatch_request(self, *args, **kwargs):
|
def dispatch_request(self, *args, **kwargs):
|
||||||
meth = getattr(self, request.method.lower(), None)
|
meth = getattr(self, request.method.lower(), None)
|
||||||
# if the request method is HEAD and we don't have a handler for it
|
# If the request method is HEAD and we don't have a handler for it
|
||||||
# retry with GET
|
# retry with GET.
|
||||||
if meth is None and request.method == 'HEAD':
|
if meth is None and request.method == 'HEAD':
|
||||||
meth = getattr(self, 'get', None)
|
meth = getattr(self, 'get', None)
|
||||||
assert meth is not None, 'Unimplemented method %r' % request.method
|
assert meth is not None, 'Unimplemented method %r' % request.method
|
||||||
|
|
|
||||||
|
|
@ -40,25 +40,25 @@ class Request(RequestBase):
|
||||||
specific ones.
|
specific ones.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#: the internal URL rule that matched the request. This can be
|
#: The internal URL rule that matched the request. This can be
|
||||||
#: useful to inspect which methods are allowed for the URL from
|
#: useful to inspect which methods are allowed for the URL from
|
||||||
#: a before/after handler (``request.url_rule.methods``) etc.
|
#: a before/after handler (``request.url_rule.methods``) etc.
|
||||||
#:
|
#:
|
||||||
#: .. versionadded:: 0.6
|
#: .. versionadded:: 0.6
|
||||||
url_rule = None
|
url_rule = None
|
||||||
|
|
||||||
#: a dict of view arguments that matched the request. If an exception
|
#: A dict of view arguments that matched the request. If an exception
|
||||||
#: happened when matching, this will be `None`.
|
#: happened when matching, this will be `None`.
|
||||||
view_args = None
|
view_args = None
|
||||||
|
|
||||||
#: if matching the URL failed, this is the exception that will be
|
#: If matching the URL failed, this is the exception that will be
|
||||||
#: raised / was raised as part of the request handling. This is
|
#: raised / was raised as part of the request handling. This is
|
||||||
#: usually a :exc:`~werkzeug.exceptions.NotFound` exception or
|
#: usually a :exc:`~werkzeug.exceptions.NotFound` exception or
|
||||||
#: something similar.
|
#: something similar.
|
||||||
routing_exception = None
|
routing_exception = None
|
||||||
|
|
||||||
# switched by the request context until 1.0 to opt in deprecated
|
# Switched by the request context until 1.0 to opt in deprecated
|
||||||
# module functionality
|
# module functionality.
|
||||||
_is_old_module = False
|
_is_old_module = False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
@ -179,7 +179,7 @@ class Request(RequestBase):
|
||||||
def _load_form_data(self):
|
def _load_form_data(self):
|
||||||
RequestBase._load_form_data(self)
|
RequestBase._load_form_data(self)
|
||||||
|
|
||||||
# in debug mode we're replacing the files multidict with an ad-hoc
|
# In debug mode we're replacing the files multidict with an ad-hoc
|
||||||
# subclass that raises a different error for key errors.
|
# subclass that raises a different error for key errors.
|
||||||
ctx = _request_ctx_stack.top
|
ctx = _request_ctx_stack.top
|
||||||
if ctx is not None and ctx.app.debug and \
|
if ctx is not None and ctx.app.debug and \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue