nevow: rend.htmlfile not found

Hello all, I recently started exploring twisted.web, and there I got suggestion for using woven/nevow. I downloaded 0.3.0 from nevow.com, and examples from http://nevow.com/Nevow2004Tutorial.html. loc Example4]$ twistd -noy sched.tac 2005/02/25 07:14 CST [-] Log opened. 2005/02/25 07:14 CST [-] twistd 1.3.0rc1 (/usr/bin/python 2.3.4) starting up 2005/02/25 07:14 CST [-] reactor class: twisted.internet.default.SelectReactor 2005/02/25 07:14 CST [-] Loading sched.tac... 2005/02/25 07:14 CST [-] Traceback (most recent call last): 2005/02/25 07:14 CST [-] File "/usr/lib/python2.3/site-packages/twisted/application/app.py", line 118, in getApplication 2005/02/25 07:14 CST [-] application = service.loadApplication(filename, style, passphrase) 2005/02/25 07:14 CST [-] File "/usr/lib/python2.3/site-packages/twisted/application/service.py", line 319, in loadApplication 2005/02/25 07:14 CST [-] application = sob.loadValueFromFile(filename, 'application', passphrase) 2005/02/25 07:14 CST [-] File "/usr/lib/python2.3/site-packages/twisted/persisted/sob.py", line 213, in loadValueFromFile 2005/02/25 07:14 CST [-] exec data in d, d 2005/02/25 07:14 CST [-] File "<string>", line 5, in ? 2005/02/25 07:14 CST [-] File "./schedule.py", line 12, in ? 2005/02/25 07:14 CST [-] class ScheduleRoot(rend.Page): 2005/02/25 07:14 CST [-] File "./schedule.py", line 13, in ScheduleRoot 2005/02/25 07:14 CST [-] docFactory = rend.htmlfile('Month.html') 2005/02/25 07:14 CST [-] AttributeError: 'module' object has no attribute 'htmlfile' 2005/02/25 07:14 CST [-] Failed to load application: 'module' object has no attribute 'htmlfile' 2005/02/25 07:14 CST [-] Traceback (most recent call last): File "/usr/bin/twistd", line 36, in ? run() File "/usr/lib/python2.3/site-packages/twisted/scripts/twistd.py", line 184, in run app.run(runApp, ServerOptions) File "/usr/lib/python2.3/site-packages/twisted/application/app.py", line 205, in run runApp(config) File "/usr/lib/python2.3/site-packages/twisted/scripts/twistd.py", line 174, in runApp application = app.getApplication(config, passphrase) --- <exception caught here> --- File "/usr/lib/python2.3/site-packages/twisted/application/app.py", line 118, in getApplication application = service.loadApplication(filename, style, passphrase) File "/usr/lib/python2.3/site-packages/twisted/application/service.py", line 319, in loadApplication application = sob.loadValueFromFile(filename, 'application', passphrase) File "/usr/lib/python2.3/site-packages/twisted/persisted/sob.py", line 213, in loadValueFromFile exec data in d, d File "<string>", line 5, in ? File "./schedule.py", line 12, in ? class ScheduleRoot(rend.Page): File "./schedule.py", line 13, in ScheduleRoot docFactory = rend.htmlfile('Month.html') exceptions.AttributeError: 'module' object has no attribute 'htmlfile' Failed to load application: 'module' object has no attribute 'htmlfile' 2005/02/25 07:14 CST [-] ----------------------------------------------------------------------------------------- And it seems there is no htmlfile member in nevow.rend. loc Example4]$ python Python 2.3.4 (#1, Oct 26 2004, 16:42:40) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from nevow import rend dir(rend) ['ChildLookupMixin', 'ConfigurableFactory', 'DataFactory', 'FourOhFour', 'Fragment', 'FreeformChildMixin', 'LiveEvilChildMixin', 'NodeNotFound', 'NotFound', 'Page', 'PageContext', 'RenderFactory', 'RequestContext', 'StringIO', 'WovenContext', '_CARRYOVER', '__builtins__', '__doc__', '__file__', '__name__', 'compy', 'defaultsFactory', 'errorsFactory', 'flat', 'formless', 'handFactory', 'iformless', 'inevow', 'log', 'mapping', 'now', 'originalFactory', 'os', 'sequence', 'statusFactory', 'tags', 'traceback', 'urllib', 'util', 'warnings']
What am I doing wrong? How do I get the example running? TIA, -- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay +91-9820-859-701

Thanks, Also I found: getting the latest source using "svn co svn://divmod.org/svn/Nevow/trunk Nevow" and running the examples.tac from the examples directory; more useful than following the tutorial as a beginner. On Fri, 25 Feb 2005 10:05:02 +0200, Tommi Virtanen <tv@twistedmatrix.com> wrote:
Amit Upadhyay wrote:
And it seems there is no htmlfile member in nevow.rend.
Please learn grep.
nevow.loaders.htmlfile
-- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay +91-9820-859-701

Amit Upadhyay wrote:
Also I found: getting the latest source using "svn co svn://divmod.org/svn/Nevow/trunk Nevow" and running the examples.tac from the examples directory; more useful than following the tutorial as a beginner.
Amit, Check out my efforts at learning Nevow: http://divmod.org/users/wiki.twistd/nevow/moin.cgi/MeLearnNevow Please feel free to supplement my comments there. -Jeff

Check out my efforts at learning Nevow:
http://divmod.org/users/wiki.twistd/nevow/moin.cgi/MeLearnNevow
Please feel free to supplement my comments there.
Thanks for the link Jeff, it was quite helpful to me. Also it would be great if you could also include a simple form processing example, or I will do it once I spend sometime understanding it. -- Amit Upadhyay Blog: http://www.rootshell.be/~upadhyay +91-9820-859-701
participants (3)
-
Amit Upadhyay
-
Jeff Bauer
-
Tommi Virtanen