Browse Source

Merge pull request #746 from ThomasWaldmann/sprint-branch

fix typos
pull/747/merge
Daniel Neuhäuser 12 years ago
parent
commit
77753e9b73
  1. 2
      flask/_compat.py
  2. 10
      flask/app.py
  3. 2
      flask/ctx.py
  4. 2
      flask/helpers.py
  5. 4
      flask/testsuite/blueprints.py

2
flask/_compat.py

@ -91,7 +91,7 @@ else:
def with_metaclass(meta, *bases):
# This requires a bit of explanation: the basic idea is to make a
# dummy metaclass for one level of class instanciation that replaces
# dummy metaclass for one level of class instantiation that replaces
# itself with the actual metaclass. Because of internal type checks
# we also need to make sure that we downgrade the custom metaclass
# for one level to something closer to type (that's why __call__ and

10
flask/app.py

@ -177,7 +177,7 @@ class Flask(_PackageBoundObject):
#: The debug flag. Set this to `True` to enable debugging of the
#: application. In debug mode the debugger will kick in when an unhandled
#: exception ocurrs and the integrated server will automatically reload
#: exception occurs and the integrated server will automatically reload
#: the application if changes in the code are detected.
#:
#: This attribute can also be configured from the config with the `DEBUG`
@ -522,7 +522,7 @@ class Flask(_PackageBoundObject):
"""The name of the application. This is usually the import name
with the difference that it's guessed from the run file if the
import name is main. This name is used as a display name when
Flask needs the name of the application. It can be set and overriden
Flask needs the name of the application. It can be set and overridden
to change the value.
.. versionadded:: 0.8
@ -697,7 +697,7 @@ class Flask(_PackageBoundObject):
This injects request, session, config and g into the template
context as well as everything template context processors want
to inject. Note that the as of Flask 0.6, the original values
in the context will not be overriden if a context processor
in the context will not be overridden if a context processor
decides to return a value with the same key.
:param context: the context as a dictionary that is updated in place
@ -1045,7 +1045,7 @@ class Flask(_PackageBoundObject):
app.error_handler_spec[None][404] = page_not_found
Setting error handlers via assignments to :attr:`error_handler_spec`
however is discouraged as it requires fidling with nested dictionaries
however is discouraged as it requires fiddling with nested dictionaries
and the special case for arbitrary exception types.
The first `None` refers to the active blueprint. If the error
@ -1550,7 +1550,7 @@ class Flask(_PackageBoundObject):
# When we create a response object directly, we let the constructor
# set the headers and status. We do this because there can be
# some extra logic involved when creating these objects with
# specific values (like defualt content type selection).
# specific values (like default content type selection).
if isinstance(rv, string_types):
rv = self.response_class(rv, headers=headers, status=status)
headers = status = None

2
flask/ctx.py

@ -286,7 +286,7 @@ class RequestContext(object):
def push(self):
"""Binds the request context to the current context."""
# If an exception ocurrs in debug mode or if context preservation is
# If an exception occurs in debug mode or if context preservation is
# activated under exception situations exactly one context stays
# on the stack. The rationale is that you want to access that
# information under debug situations. However if someone forgets to

2
flask/helpers.py

@ -330,7 +330,7 @@ def get_template_attribute(template_name, attribute):
.. versionadded:: 0.2
:param template_name: the name of the template
:param attribute: the name of the variable of macro to acccess
:param attribute: the name of the variable of macro to access
"""
return getattr(current_app.jinja_env.get_template(template_name).module,
attribute)

4
flask/testsuite/blueprints.py

@ -105,7 +105,7 @@ class ModuleTestCase(FlaskTestCase):
app = flask.Flask(__name__)
admin = flask.Module(__name__, 'admin', url_prefix='/admin')
@app.context_processor
def inject_all_regualr():
def inject_all_regular():
return {'a': 1}
@admin.context_processor
def inject_admin():
@ -534,7 +534,7 @@ class BlueprintTestCase(FlaskTestCase):
c = app.test_client()
self.assertEqual(c.get('/py/foo').data, b'bp.foo')
# The rule's din't actually made it through
# The rule's didn't actually made it through
rv = c.get('/py/bar')
assert rv.status_code == 404
rv = c.get('/py/bar/123')

Loading…
Cancel
Save