|
[Webware-checkins] CVS: Webware/WebKit ConfigurableForServerSidePath.py,1.3,1.4
From: Ian Bicking <ianbicking@us...> - 2003-03-25 22:52
|
Update of /cvsroot/webware/Webware/WebKit In directory sc8-pr-cvs1:/tmp/cvs-serv919 Modified Files: ConfigurableForServerSidePath.py Log Message: docstring Index: ConfigurableForServerSidePath.py =================================================================== RCS file: /cvsroot/webware/Webware/WebKit/ConfigurableForServerSidePath.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConfigurableForServerSidePath.py 20 Jun 2002 17:48:08 -0000 1.3 --- ConfigurableForServerSidePath.py 25 Mar 2003 22:52:04 -0000 1.4 *************** *** 3,16 **** class ConfigurableForServerSidePath(Configurable): """ ! This is a version of Configurable that provides a customized setting() method for classes which have a serverSidePath() method. If a setting's name ends with "Filename" or "Dir", its value is passed through serverSidePath() before being returned. ! In other words, relative filenames and directory names are expanded with the location of the object, NOT the current directory. ! Application and AppServer are two well known users of this mix-in. Any class that has a serverSidePath() method and a Configurable base class, should inherit this class instead. """ def setting(self, name, default=NoDefault): ! """ Returns the setting, filtered by self.serverSidePath(), if the name ends with 'Filename' or 'Dir'. """ value = Configurable.setting(self, name, default) if name[-8:]=='Filename' or name[-3:]=='Dir': --- 3,33 ---- class ConfigurableForServerSidePath(Configurable): + """ ! This is a version of `MiscUtils.Configurable.Configurable` ! that provides a customized `setting` method for classes which ! have a `serverSidePath` method. If a setting's name ends with ! ``Filename`` or ``Dir``, its value is passed through ! `serverSidePath` before being returned. ! In other words, relative filenames and directory names are ! expanded with the location of the object, NOT the current ! directory. ! Application and AppServer are two well known users of this ! mix-in. Any class that has a `serverSidePath` method and a ! `Configurable` base class, should inherit this class instead. ! ! This is used with for MakeAppWorkDir, which changes the ! serverSidePath. """ def setting(self, name, default=NoDefault): ! """ ! Returns the setting, filtered by ! self.serverSidePath(), if the name ends with ! ``Filename`` or ``Dir``. ! """ ! value = Configurable.setting(self, name, default) if name[-8:]=='Filename' or name[-3:]=='Dir': |
| Thread | Author | Date |
|---|---|---|
| [Webware-checkins] CVS: Webware/WebKit ConfigurableForServerSidePath.py,1.3,1.4 | Ian Bicking <ianbicking@us...> |