diff options
| author | Michael Merickel <michael@merickel.org> | 2016-12-14 00:25:46 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2016-12-14 00:25:46 -0600 |
| commit | 12a11daa6a29c36488f083ec7323ad1d91f11b8b (patch) | |
| tree | 6967360418b3f8c1ab335598f4e5a6df3b184584 /docs/narr | |
| parent | 3c5731a1cac958e05093df56263d52433fc683a9 (diff) | |
| parent | 8dfa640a52d57b630843a65b3b84bc13a8a1ed87 (diff) | |
| download | pyramid-12a11daa6a29c36488f083ec7323ad1d91f11b8b.tar.gz pyramid-12a11daa6a29c36488f083ec7323ad1d91f11b8b.tar.bz2 pyramid-12a11daa6a29c36488f083ec7323ad1d91f11b8b.zip | |
Merge branch 'master' into pr/2853
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/project.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 9b0d54ec7..62c4723df 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -1067,3 +1067,25 @@ hard drive, you should install the `watchdog <http://pythonhosted.org/watchdog/>` package in development. ``hupper`` will automatically use ``watchdog`` to more efficiently poll the filesystem. + +Monitoring Custom Files +~~~~~~~~~~~~~~~~~~~~~~~ + +By default, ``pserve --reload`` will monitor all imported Python code +(everything in ``sys.modules``) as well as the config file passed to +``pserve`` (e.g. ``development.ini``). You can instruct ``pserve`` to watch +other files for changes as well by defining a ``[pserve]`` section in your +configuration file. For example, let's say your application loads the +``favicon.ico`` file at startup and stores it in memory to efficiently +serve it many times. When you change it you want ``pserve`` to restart: + +.. code-block:: ini + + [pserve] + watch_files = + myapp/static/favicon.ico + +Paths may be absolute or relative to the configuration file. They may also +be an :term:`asset specification`. These paths are passed to ``hupper`` which +has some basic support for globbing. Acceptable glob patterns depend on the +version of Python being used. |
