Re: [Rest2web-develop] Problems with page-description following tutorial
Brought to you by:
mjfoord
From: Michael F. <fuz...@vo...> - 2006-08-27 23:02:58
|
Grzegorz Adam Hankiewicz wrote: > On 2006-08-27, Grzegorz Adam Hankiewicz <gr...@ti...> wrote: > >> I don't understand why the description is cut down. The use of >> different "tag" names for opening closing sections seems confusing >> too. What am I doing wrong and how do I get the description >> generated correctly? >> > > Looks like the problem is hard tabs. I'm playing now with the > content of template.txt using: > Ok, I wondered if the problem was with hard tabs. I've had that reported with Firedrop2 which uses the same module for templates. Thanks for the report, I'll fix it for the next release. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > <div id="menu"> > <# > print_details(default_section, subsection_title="") > #> > <p/> > </div> > > If the print_details doesn't have indentation, everything goes > well. If I put a single tab before it, I get: > > rest2web version 0.5.0 beta1 > Running rest2web the Site Builder. > Sun Aug 27 21:42:55 2006 > > Traceback (most recent call last): > [err] File "../instalacion_manual/rest2web-dist-201/r2w.py", line 185, in ? > [err] count = main(options, config) > [err] File "../instalacion_manual/rest2web-dist-201/r2w.py", line 94, in main > [err] return processor.walk() > [err] File "/home/gradha/instalacion_manual/rest2web-dist-201/rest2web/restprocessor.py", line 385, in walk > [err] self.buildsection() > [err] File "/home/gradha/instalacion_manual/rest2web-dist-201/rest2web/restprocessor.py", line 1353, in buildsection > [err] thepage = render_well(temp_file, namespace, final_encoding=final_encoding) > [err] File "/home/gradha/instalacion_manual/rest2web-dist-201/rest2web/embedded_code.py", line 89, in render_well > [err] template = render(template, namespace, uservalues,final_encoding=final_encoding) > [err] File "/home/gradha/instalacion_manual/rest2web-dist-201/rest2web/embedded_code.py", line 72, in render > [err] value = fun(occ, namespace) > [err] File "/home/gradha/instalacion_manual/rest2web-dist-201/rest2web/embedded_code.py", line 138, in render_value_exec > [err] exec codeobj in namespace > [err] File "<string>", line 2, in ? > [err] NameError: name 'etails' is not defined > [err] > > Using two tabs would result in: > > [err] File "/home/gradha/instalacion_manual/rest2web-dist-201/rest2web/embedded_code.py", line 131, in render_value_exec > [err] codeobj = compile(code, '<string>', 'exec') > [err] File "<string>", line 2 > [err] default_section, subsection_title="") > [err] ^ > [err] SyntaxError: invalid syntax > [err] > > So hard tabs are evil. What can I do if I believe space indentation > is evil? > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > > |