Skip to content
Myr

Merge pull request #1117 from lord63/patch-1

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

Fix some typos

authored by Daniel Neuhäuser · committed by Daniel Neuhäuser · parents 221aaa5, 29768ce · Browse files · 4 files+7 added−7 removed
This commit

State

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

Diff stats

4 files+7 added−7 removed

  • other:+7 added−7 removed

4 files+7 added−7 removed

modified:docs/becomingbig.rst+1 added-1 removed
10 unmodified lines
11Flask started in part to demonstrate how to build your own framework on top of12existing well-used tools Werkzeug (WSGI) and Jinja (templating), and as it13developed, it became useful to a wide audience. As you grow your codebase,14don't just use Flask -- understand it. Read the source. Flask's code is15written to be read; it's documentation published so you can use its internal15written to be read; it's documentation is published so you can use its internal16APIs. Flask sticks to documented APIs in upstream libraries, and documents its17internal utilities so that you can find the hook points needed for your18project.19
82 unmodified lines
modified:docs/config.rst+4 added-4 removed
192 unmodified lines
193 what subdomains are, your web browser does as well. Most modern web194 browsers will not allow cross-subdomain cookies to be set on a195 server name without dots in it. So if your server name is196 ``'localhost'`` you will not be able to set a cookie for197 ``'localhost'`` and every subdomain of it. Please chose a different197 ``'localhost'`` and every subdomain of it. Please choose a different198 server name in that case, like ``'myapplication.local'`` and add199 this name + the subdomains you want to use into your host config200 or setup a local `bind`_.201
84 unmodified lines
286a little harder. There is no single 100% solution for this problem in287general, but there are a couple of things you can keep in mind to improve288that experience:2892901. create your application in a function and register blueprints on it.2901. Create your application in a function and register blueprints on it.291 That way you can create multiple instances of your application with292 different configurations attached which makes unittesting a lot293 easier. You can use this to pass in configuration as needed.294
52 unmodified lines
347348There are many different ways and it's up to you how you want to manage349your configuration files. However here a list of good recommendations:350351- keep a default configuration in version control. Either populate the351- Keep a default configuration in version control. Either populate the352 config with this default configuration or import it in your own353 configuration files before overriding values.354- use an environment variable to switch between the configurations.354- Use an environment variable to switch between the configurations.355 This can be done from outside the Python interpreter and makes356 development and deployment much easier because you can quickly and357 easily switch between different configs without having to touch the358 code at all. If you are working often on different projects you can
92 unmodified lines
modified:docs/shell.rst+1 added-1 removed
96 unmodified lines
97with stuff you want to star import into your interactive session. There98you could also define some more helper methods for common things such as99initializing the database, dropping tables etc.100101Just put them into a module (like `shelltools` and import from there):101Just put them into a module (like `shelltools`) and import from there:102103>>> from shelltools import *
modified:docs/templating.rst+1 added-1 removed
117 unmodified lines
118Controlling Autoescaping119------------------------120121Autoescaping is the concept of automatically escaping special characters122of you. Special characters in the sense of HTML (or XML, and thus XHTML)122for you. Special characters in the sense of HTML (or XML, and thus XHTML)123are ``&``, ``>``, ``<``, ``"`` as well as ``'``. Because these characters124carry specific meanings in documents on their own you have to replace them125by so called "entities" if you want to use them for text. Not doing so126would not only cause user frustration by the inability to use these
96 unmodified lines