Mercurial > cgi-bin > hgweb.cgi > tincan
view doc/configuration.rst @ 69:c168aad7a731 draft
Fix template error reportage.
author | David Barts <n5jrn@me.com> |
---|---|
date | Mon, 15 Jul 2019 08:13:51 -0700 |
parents | 55828c01e38f |
children |
line wrap: on
line source
************* Configuration ************* Basically, there isn't very much configuration to contend with. It's all in the files you create in your webapp's directory tree. TinCan figures it out from them and takes it from there: * A route is created for each ``.pspx`` file. * By default, a ``.pspx`` file's code-behind is find in a ``.py`` file with the same base name. * Header directives in the ``.pspx`` files can be used to alter the default behavior. * The ``tincan.launch`` call accepts optional arguments which can be used to tailor how a webapp is launched and run. =============================================== Case-Sensitive and Case-Preserving File Systems =============================================== A word here is necessary about case-sensitive versus case-preserving files systems. Unix and Linux systems have case-sensitive file systems; ``file.pspx``, ``File.Pspx``, and ``FILE.PSPX`` are three completely different files. It is possible for all three files to coexist in the same directory. Windows and MacOS are case-preserving file systems; only one of the three is allowed to exist at any time, and a request for any one of those names will match the existing one. TinCan knows about both kinds of file systems, and acts slightly differently depending on which kind the system it is being run under has. When run on a case-preserving system, ``FILE.PSPX``, ``File.Pspx``, ``file.pspx``, and even ``fIlE.pSpX`` will be recognized as having the correct sort of extension to define a route and template. On a case-sensitive system, only ``file.pspx`` will be so recognized. It is important to note, however, that while a file system might not be case sensitive, *routes are always case sensitive*. A TinCan webapp under Windows that contains ``FILE.PSPX`` will get a route created that matches *only* the capitalized version of the name that appears on the Windows file system. It is for this reason that it is probably best to stick to one capitalization strategy, even on non-case-sensitive systems.