Fix typos in config.rst
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by lord63 · committed by lord63 · parent 7777b06 · Browse files · 1 file·+6 added−6 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+6 added−6 removed
- other:+6 added−6 removed
Provenance
- Commit
02e7bec- Tree
5e22426- Author
lord63 <lord63.j@gmail.com>- Committer
lord63 <lord63.j@gmail.com>- Parent
7777b06
1 file changed+6 added−6 removed
modified:docs/config.rst+6 added-6 removed
8 unmodified lines9 you might want to change depending on the application environment like10 toggling the debug mode, setting the secret key, and other such as11 environment-specific things.12 13-The way Flask is designed usually requires the configuration to be13+The way Flask designed usually requires the configuration to be14 available when the application starts up. You can hardcode the15 configuration in the code, which for many small applications is not16 actually that bad, but there are better ways.17 175 unmodified lines193 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 46 unmodified lines248 249 This first loads the configuration from the250 `yourapplication.default_settings` module and then overrides the values251 with the contents of the file the :envvar:`YOURAPPLICATION_SETTINGS`252-environment variable points to. This environment variable can be set on252+environment variable pointing to. This environment variable can be set on253 Linux or OS X with the export command in the shell before starting the254 server::255 256 $ export YOURAPPLICATION_SETTINGS=/path/to/settings.cfg29 unmodified lines286 a little harder. There is no single 100% solution for this problem in287 general, but there are a couple of things you can keep in mind to improve288 that experience:289 290-1. create your application in a function and register blueprints on it.290+1. 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 lines347 348 There are many different ways and it's up to you how you want to manage349 your configuration files. However here a list of good recommendations:350 351-- 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 can92 unmodified lines