From 16e4d5a6553ff9c89a61c44ddec7da21126b631a Mon Sep 17 00:00:00 2001 From: florentx Date: Wed, 7 Jul 2010 02:07:11 +0800 Subject: [PATCH] Various typos. --- docs/patterns/packages.rst | 2 +- flask/app.py | 5 ++--- flask/logging.py | 2 +- flask/module.py | 2 +- flask/session.py | 2 +- flask/templating.py | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/patterns/packages.rst b/docs/patterns/packages.rst index cb372f2e..63d7d76e 100644 --- a/docs/patterns/packages.rst +++ b/docs/patterns/packages.rst @@ -241,5 +241,5 @@ static folder of the whole application as ``'static'``. If you want to refer to the templates you just have to prefix it with the name of the module. So for the admin it would be ``render_template('admin/list_items.html')`` and so on. It is not -possible to refer to templates without the prefixed modlue name. This is +possible to refer to templates without the prefixed module name. This is explicit unlike URL rules. diff --git a/flask/app.py b/flask/app.py index 0bdce818..d16613b7 100644 --- a/flask/app.py +++ b/flask/app.py @@ -31,7 +31,7 @@ from .globals import _request_ctx_stack, request from .session import Session, _NullSession from .module import _ModuleSetupState from .templating import _DispatchingJinjaLoader, \ - _default_template_ctx_processor + _default_template_ctx_processor # a lock used for logger initialization _logger_lock = Lock() @@ -426,8 +426,7 @@ class Flask(_PackageBoundObject): if self.config['SERVER_NAME'] is not None: domain = '.' + self.config['SERVER_NAME'] session.save_cookie(response, self.session_cookie_name, - expires=expires, httponly=True, - domain=domain) + expires=expires, httponly=True, domain=domain) def register_module(self, module, **options): """Registers a module with this application. The keyword argument diff --git a/flask/logging.py b/flask/logging.py index 4ccd8b1b..29caadce 100644 --- a/flask/logging.py +++ b/flask/logging.py @@ -11,7 +11,7 @@ from __future__ import absolute_import -from logging import getLogger, StreamHandler, Formatter, Logger, DEBUG +from logging import getLogger, StreamHandler, Formatter, Logger, DEBUG def create_logger(app): diff --git a/flask/module.py b/flask/module.py index b30020c5..8935359e 100644 --- a/flask/module.py +++ b/flask/module.py @@ -15,7 +15,7 @@ from .helpers import _PackageBoundObject def _register_module(module, static_path): """Internal helper function that returns a function for recording that registers the `send_static_file` function for the module on - the application of necessary. It also registers the module on + the application if necessary. It also registers the module on the application. """ def _register(state): diff --git a/flask/session.py b/flask/session.py index 324fc98d..df2d8773 100644 --- a/flask/session.py +++ b/flask/session.py @@ -37,7 +37,7 @@ class _NullSession(Session): def _fail(self, *args, **kwargs): raise RuntimeError('the session is unavailable because no secret ' 'key was set. Set the secret_key on the ' - 'application to something unique and secret') + 'application to something unique and secret.') __setitem__ = __delitem__ = clear = pop = popitem = \ update = setdefault = _fail del _fail diff --git a/flask/templating.py b/flask/templating.py index 06d8be04..23c55c2b 100644 --- a/flask/templating.py +++ b/flask/templating.py @@ -48,7 +48,7 @@ class _DispatchingJinjaLoader(BaseLoader): return loader.get_source(environment, name) except TemplateNotFound: pass - # raise the exception with the correct fileame here. + # raise the exception with the correct filename here. # (the one that includes the prefix) raise TemplateNotFound(template)