Thread: [Rest2web-develop] Problems with page-description following tutorial
Brought to you by:
mjfoord
From: Grzegorz A. H. <gr...@ti...> - 2006-08-27 17:33:43
Attachments:
q.tar.bz2
|
I'm putting bits together from the tutorial (attached) and the generation of the index page contains the following HTML code: <div id="menu"> <h3>Pages</h3> <ul><li><a href="somecontent.html">This is the Page Title of somecontent</a><dl class="docutils"> <dt>ription of the page.</dt> <dd>than one line long.</dd> </dl> </li></ul> <h3>Sub Sections</h3> That code is generated from: restindex format: rest page-title: This is the Page Title of somecontent crumb: Short Title page-description: This is a description of the page. It can be more than one line long. /description /restindex 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? |
From: Grzegorz A. H. <gr...@ti...> - 2006-08-27 19:48:03
|
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: <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? |
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 > > |
From: Michael F. <fuz...@gm...> - 2006-10-09 23:31:19
|
On 27/08/06, Grzegorz Adam Hankiewicz <gr...@ti...> 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: > > <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: I've found and fixed this. It should work from the next release. Mixed tabs and spaces are going to cause the usual problems though. :-) Fuzzyman 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 > -- http://www.Voidspace.org.uk The Place where headspace meets cyberspace. Online resource site - covering science, technology, computing, cyberpunk, psychology, spirituality, fiction and more. --- http://www.Voidspace.org.uk/python/index.shtml Python utilities, modules and apps. Including Nanagram, Dirwatcher and more. --- http://www.fuchsiashockz.co.uk --- Everyone has talent. What is rare is the courage to follow talent to the dark place where it leads. -Erica Jong Ambition is a poor excuse for not having sense enough to be lazy. -Milan Kundera |