Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 199 lines (169 sloc) 9.409 kB
32567d8 Initial revision
tavis_rudd authored
1 Cheetah TODO list
5610e47 added some instructions
tavis_rudd authored
2 -----------------
3 * If you are working on a task please put your initials at the end of the
4 description
9eb346f updated the list
tavis_rudd authored
5 * When a task is completed please remember to note it in the CHANGES file
c79ab09 *** empty log message ***
hierro authored
6 * Unresolved bugs are listed in the BUGS file. Resolved bugs are be listed
7 in the CHANGES file if the bug is considered significant enough and it
8 affected a released version of Cheetah.
5610e47 added some instructions
tavis_rudd authored
9
e07ad1e *** empty log message ***
hierro authored
10
448c9b0 *** empty log message ***
hierro authored
11 Requirements for 1.0
e07ad1e *** empty log message ***
hierro authored
12 =========================================================================
533f02a *** empty log message ***
hierro authored
13 - CheetahWrapper bugs: suppress verbose output if --stdout/-p. (MO)
7c2b7c4 *** empty log message ***
hierro authored
14 - NameMapper attributes before keys, both Python and C versions. NM should
15 look for a key first, then an attribute. But if (1) this is the first
16 component after $, and (2) isinstance(OBJ, dictTypes), *ignore the
17 attributes* to prevent matching methods like .update, .keys, etc.
18 "dictTypes" is a new compiler setting with the default value
19 (types.DictType, UserDict). (TR)
c79ab09 *** empty log message ***
hierro authored
20 - update User's Guide about changes to SkeletonPage (no more #settings,
21 etc) (TR)
72fd467 *** empty log message ***
hierro authored
22 - Decide on Cheetah's 1.0 license and update the Users' Guide. (TR)
de8d104 *** empty log message ***
hierro authored
23 - Add an example in the distribution of a simplified SkeletonPage
24 that used #block but does not have fancy esoteric methods like
25 style stuff. (MO)
859cd22 *** empty log message ***
tavis_rudd authored
26 - fix the --stdout option of CheetahWrapper so that it only prints
27 the generated python code.(TR)
e07ad1e *** empty log message ***
hierro authored
28
29
30 Other TODO Items
32567d8 Initial revision
tavis_rudd authored
31 ================================================================================
d1a5287 added notes and change the version number
tavis_rudd authored
32
533f02a *** empty log message ***
hierro authored
33 - CheetahWrapper stuff: (MO)
34 * "cheetah compile --shbang '#!/usr/bin/python2.2'"
35 * "cheetah code [options] [FILES]" print template-specific portion of main
36 method(s) to stdout, with line numbers.
37 * Refactor, make compile/fill/code routines callbacks using a bundle arg.
8e077f0 *** empty log message ***
hierro authored
38
533f02a *** empty log message ***
hierro authored
39 - Debugging tools. See section below.
99009bd *** empty log message ***
hierro authored
40
73ce5a8 *** empty log message ***
hierro authored
41 - revisit parsed #include directives. Are they necessary at all??
42 (This is a rhetorical question. They are necessary. However, the
43 Users' Guide needs better examples about when and when not to use
44 #include. Also, consider making '#include' do a raw include, and
45 something else do a parsed include ('#include parsed', '#include cheetah'?),
46 so that users get parsing only if they explicitly request it.
578d388 updated
tavis_rudd authored
47
47eece1 *** empty log message ***
tavis_rudd authored
48 - implement some better error handling for misformed #for, #if, #try directives,
49 etc. At the moment these errors are not caught until Python executes the
50 code.
6f5a89f *** empty log message ***
tavis_rudd authored
51
52 - create better error message for bad code such as:
53 ##cache
54 This is a cached region. $voom
55 #end cache
56
20f87b7 *** empty log message ***
tavis_rudd authored
57 - create a better error message for invalid syntax when a $var inside a
58 directive is enclosed in ${} or $(). E.g.:
59 #include raw source=${x}
60
1086d3c Elaborate whitespace-comment problem.
hierro authored
61 - Delete whitespace before a comment on the same line. The methods are
62 Parser.eatComment() and Parser.eatMultiLineComment(). It's already
63 working if the line contains 'STUFF#slurp ## comment'. Need to make
64 it work for 'STUFF ## comment' (but retain the EOL newline).
0beed83 *** empty log message ***
tavis_rudd authored
65
66 - 'python setup.py uninstall'. This may require hacking an uninstall feature
67 into distutils.
68
cbdb049 *** empty log message ***
hierro authored
69 - 'errorCatcher None' to stop catching errors in the middle of a template.
f4b3b51 *** empty log message ***
hierro authored
70
982f7b9 *** empty log message ***
hierro authored
71 - Finish up changes to #indent so that it matches the Users' Guide. (MO)
72
d1e5768 *** empty log message ***
hierro authored
73
8f06caf *** empty log message ***
hierro authored
74 Dump Tools
75 ==========
76 It would be nice to provide debugging tools for users who can't figure
77 out why a certain placeholder value isn't found or is being overridden.
78 My idea is to define $dumpSearchList() and $dumpSearchListFlat() in
79 Template, which would print a stanza in the output showing all searchList
80 variables and their values. $dumpSearchList would group by searchList
81 element; $dumpSearchListFlat would combine all into a single
82 alphabetical listing.
83 I made an experimental version but it printed only instance variables,
84 not methods and not inherited attributes. Also, it wouldn't print right
85 using the usual pattern of write-to-custom-StringIO-object-and-return-
86 the-.getvalue() and I couldn't figure out why.
87 The stanza should be set apart by a row of stars with the words
88 "BEGIN/END SEARCH LIST DUMP". Then for $dumpSearchList, precede each
89 group with "*** searchList[i], type <element type>, 142 variables ***".
90 Because some elements like 'self' may have hundreds of inherited
91 methods that would create a forest-through-trees situation for the user,
92 we may need an option to supress the variable listing for elements with
93 > 20 variables (just print the summary line instead). ?
94 The final version should be in Template so it has implicit
95 access to the searchList and perhaps later to other variables (locals,
96 globals, "#set global"s, builtins) too. This is such a central
97 debugging tool that you should not have to monopolize an #extends
98 (the template's only #extends) to use it. You could import it, however,
99 if you pass in the searchList explicitly as an argument. In that case,
100 perhaps we can base it on a generic module for dumping variables/values.
101 Note that we cannot simply depend on str() and pprint, because
102 we need to show instances as dictionaries. Likewise, dir() and vars()
103 may get us part of the distance, but only if they show methods and
104 inherited attributes too.
105 These functions should print only top-level variables, not
106 the subelements of collections. I.e, if the first searchList element
107 is a dictionary, show its keys/values, but do not expand any
108 subvalues if they are dictionaries too, unless the display tool happens
109 to default to that.
110
111
d1e5768 *** empty log message ***
hierro authored
112 Rewrite the caching framework
113 =============================
114 - add #cache varyBy= (tied to Tavis' proposed caching framework for Webware)
115
116 - #cache test= with a one-variable test produces invalid Python (an empty
117 if-block). Example in Cheetah Developers' Guide, section
118 "#cache with test: expression and method conditions".
119
120 - #cache id= seems to be ignoring the ID and generating a random numeric
121 ID instead. Is it working? Do cache IDs have to be numeric?
122
123 - Other ideas in Tavis' head.
124
c79ab09 *** empty log message ***
hierro authored
125 - Have an option to refresh the cache whenever an external
126 file is updated. This would allow a data structure to be kept in
127 sync whenever its text configuration file is changed.
128
55de2db Comment.
hierro authored
129 #entry $func($arg1, $arg2="default", $**kw)
625de1d *** empty log message ***
hierro authored
130 ===============================================================================
55de2db Comment.
hierro authored
131 Make a wrapper function in the .py template module that builds a searchList
132 from its positional arguments, then instantiates and fills a template and
133 returns the result. The preceding example would create a function thus:
134 def func(arg1, arg2="default", searchList=None, **kw):
625de1d *** empty log message ***
hierro authored
135 """Function docstring."""
55de2db Comment.
hierro authored
136 sl = {'arg1': arg1, 'arg2': arg2}
137 if searchList is None:
138 searchList = [sl]
139 elif type(searchList) == types.ListType:
140 searchList.insert(0, sl)
141 else:
142 raise TypeError("arg 'searchList'")
143 t = TheTemplate(searchList=searchList, **kw)
625de1d *** empty log message ***
hierro authored
144 return str(t)
55de2db Comment.
hierro authored
145 ##doc-entry: and #*doc-entry: comments are appended to the function docstring.
625de1d *** empty log message ***
hierro authored
146 Finally, make this function accessible directly from the shell.
147 If there are any non-option arguments on the command line, call the function
148 instead of filling the template the normal way.
55de2db Comment.
hierro authored
149 This would perhaps make more sense as arguments to .respond(). But
150 .respond() has that pesky 'trans' argument that mustn't be interfered with,
151 and other programs may assume .respond() takes only one argument. Also,
152 when called via str(), str() cannot take arguments.
625de1d *** empty log message ***
hierro authored
153
154
63640d7 *** empty log message ***
hierro authored
155 Upload File
156 ========================================================================
157 A mixin method in Cheetah.Utils (for Template) that handles file uploads --
158 these are too complicated for .webInput(). The method should do a "safe"
159 file upload; e.g., http://us3.php.net/manual/en/features.file-upload.php ,
160 within the limitations of Python's cgi module. The user has the choice of
161 three destinations for the file contents: (A) copied to a local
162 path you specify, (B) placed in a namespace variable like .cgiImport()
163 does, or (C) returned. (B) parallels .webInput, but (A) will certainly be
164 desirable situations where we just want to save the file, not read it into
165 memory. Reject files larger than a user-specified size or not in a list of
166 user-approved MIME types. Define appropriate exceptions for typical
167 file-upload errors. Method name .webUploadFileAsString?
168 One situation to support is when form has a text(area) field
169 related to a file-upload control on the same form, and the user has the choice
170 of typing into the field or uploading a text file. We need a method that
171 updates the text field's value if there is an uploaded file, but not if there
172 isn't. This may be handled by the regular method(s) or may require a separate
173 method.
625de1d *** empty log message ***
hierro authored
174
a08b622 *** empty log message ***
hierro authored
175
32567d8 Initial revision
tavis_rudd authored
176 Test Suite
177 ================================================================================
178 - test cases for the SkeletonPage framework
0cbb2a2 updated
tavis_rudd authored
179 - add cases that test the cheetah-compile script
0916737 *** empty log message ***
hierro authored
180 - add cases that test the integration with WebKit. Since these must be called
181 from a running WebKit server, make a servlet that runs the tests and outputs
182 diagnostics to the browser.
32567d8 Initial revision
tavis_rudd authored
183
184 Website
185 ================================================================================
8d09b72 *** empty log message ***
tavis_rudd authored
186 - automate the documentation update
32567d8 Initial revision
tavis_rudd authored
187 - See if we can get WebKit working on Sourceforge...
188
189 Examples
190 ================================================================================
191 - create some non-html code generation examples
0cbb2a2 updated
tavis_rudd authored
192 - SQL
193 - LaTeX
194 - form email
6d1d0e1 *** empty log message ***
hierro authored
195 - Template definitions in a database. .py template modules in a
196 database? Caching template classes and/or instances extracted from
197 a database.
198 - Pickled templates?
Something went wrong with that request. Please try again.