Skip to content
Myr

Merge pull request #746 from ThomasWaldmann/sprint-branch

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

fix typos

authored by Daniel Neuhäuser · committed by Daniel Neuhäuser · parents 4baeac0, 13cc699 · Browse files · 5 files+10 added−10 removed
This commit

State

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

Diff stats

5 files+10 added−10 removed

  • other:+10 added−10 removed

5 files+10 added−10 removed

modified:flask/testsuite/blueprints.py+2 added-2 removed
103 unmodified lines
104 def test_context_processors(self):105 app = flask.Flask(__name__)106 admin = flask.Module(__name__, 'admin', url_prefix='/admin')107 @app.context_processor108 def inject_all_regualr():108 def inject_all_regular():109 return {'a': 1}110 @admin.context_processor111 def inject_admin():112 return {'b': 2}
420 unmodified lines
533 app.register_blueprint(bp, url_prefix='/py')534535 c = app.test_client()536 self.assertEqual(c.get('/py/foo').data, b'bp.foo')537 # The rule's din't actually made it through537 # The rule's didn't actually made it through538 rv = c.get('/py/bar')539 assert rv.status_code == 404540 rv = c.get('/py/bar/123')541 assert rv.status_code == 404
224 unmodified lines
modified:flask/_compat.py+1 added-1 removed
89 unmodified lines
909192def with_metaclass(meta, *bases):93 # This requires a bit of explanation: the basic idea is to make a94 # dummy metaclass for one level of class instanciation that replaces94 # dummy metaclass for one level of class instantiation that replaces95 # itself with the actual metaclass. Because of internal type checks96 # we also need to make sure that we downgrade the custom metaclass97 # for one level to something closer to type (that's why __call__ and98 # __init__ comes back from type etc.).
17 unmodified lines
modified:flask/app.py+5 added-5 removed
175 unmodified lines
176 del _get_request_globals_class, _set_request_globals_class177178 #: The debug flag. Set this to `True` to enable debugging of the179 #: application. In debug mode the debugger will kick in when an unhandled180 #: exception ocurrs and the integrated server will automatically reload180 #: exception occurs and the integrated server will automatically reload181 #: the application if changes in the code are detected.182 #:183 #: This attribute can also be configured from the config with the `DEBUG`184 #: configuration key. Defaults to `False`.
336 unmodified lines
521 def name(self):522 """The name of the application. This is usually the import name523 with the difference that it's guessed from the run file if the524 import name is main. This name is used as a display name when525 Flask needs the name of the application. It can be set and overriden525 Flask needs the name of the application. It can be set and overridden526 to change the value.527528 .. versionadded:: 0.8529 """
166 unmodified lines
696 """Update the template context with some commonly used variables.697 This injects request, session, config and g into the template698 context as well as everything template context processors want699 to inject. Note that the as of Flask 0.6, the original values700 in the context will not be overriden if a context processor700 in the context will not be overridden if a context processor701 decides to return a value with the same key.702703 :param context: the context as a dictionary that is updated in place704 to add extra variables.
339 unmodified lines
1044 return 'This page does not exist', 4041045 app.error_handler_spec[None][404] = page_not_found10461047 Setting error handlers via assignments to :attr:`error_handler_spec`1048 however is discouraged as it requires fidling with nested dictionaries1048 however is discouraged as it requires fiddling with nested dictionaries1049 and the special case for arbitrary exception types.10501051 The first `None` refers to the active blueprint. If the error1052 handler should be application wide `None` shall be used.
496 unmodified lines
1549 if not isinstance(rv, self.response_class):1550 # When we create a response object directly, we let the constructor1551 # set the headers and status. We do this because there can be1552 # some extra logic involved when creating these objects with1553 # specific values (like defualt content type selection).1553 # specific values (like default content type selection).1554 if isinstance(rv, string_types):1555 rv = self.response_class(rv, headers=headers, status=status)1556 headers = status = None1557 else:
258 unmodified lines
modified:flask/ctx.py+1 added-1 removed
284 unmodified lines
285 self.request.routing_exception = e286287 def push(self):288 """Binds the request context to the current context."""289 # If an exception ocurrs in debug mode or if context preservation is289 # If an exception occurs in debug mode or if context preservation is290 # activated under exception situations exactly one context stays291 # on the stack. The rationale is that you want to access that292 # information under debug situations. However if someone forgets to293 # pop that context again we want to make sure that on the next push
81 unmodified lines
modified:flask/helpers.py+1 added-1 removed
328 unmodified lines
329330 .. versionadded:: 0.2331332 :param template_name: the name of the template333 :param attribute: the name of the variable of macro to acccess333 :param attribute: the name of the variable of macro to access334 """335 return getattr(current_app.jinja_env.get_template(template_name).module,336 attribute)337
508 unmodified lines