Mercurial > p > roundup > code
annotate roundup/templates/__init__.py @ 905:502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
The two templates have been migrated to that setup. Lots of unit
tests. Still some issue in the web form for editing Roles assigned to
users.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 26 Jul 2002 08:27:00 +0000 |
| parents | 18134bffab37 |
| children | e5826025eeb7 |
| rev | line source |
|---|---|
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
1 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
3 # This module is free software, and you may redistribute it and/or modify |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
4 # under the same terms as Python, so long as this copyright message and |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
5 # disclaimer are retained in their original form. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
6 # |
| 214 | 7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
10 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
11 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
17 # |
| 214 | 18 # $Id: __init__.py,v 1.4 2001-08-07 00:24:43 richard Exp $ |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
19 |
|
146
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
20 import os |
|
68
5e71aaa87e5b
Added templatebuilder module.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
21 |
|
146
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
22 def listTemplates(): |
|
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
23 t_dir = os.path.split(__file__)[0] |
|
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
24 l = [] |
|
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
25 for entry in os.listdir(t_dir): |
|
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
26 # this isn't strictly necessary - the CVS dir won't be distributed |
|
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
27 if entry == 'CVS': continue |
|
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
28 if os.path.isdir(os.path.join(t_dir, entry)): |
|
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
29 l.append(entry) |
|
da7b97149caa
Support for determining the installed tempaltes
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
30 return l |
|
68
5e71aaa87e5b
Added templatebuilder module.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
31 |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
32 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
33 # $Log: not supported by cvs2svn $ |
| 214 | 34 # Revision 1.3 2001/08/07 00:15:51 richard |
| 35 # Added the copyright/license notice to (nearly) all files at request of | |
| 36 # Bizar Software. | |
| 37 # | |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
38 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
39 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
146
diff
changeset
|
40 # vim: set filetype=python ts=4 sw=4 et si |
