tag:blogger.com,1999:blog-11802292.post6526097442071359949..comments2023-10-16T03:31:20.095-07:00Comments on Catherine: pyOraGeek: templating engine cookoff updatedAnonymoushttp://www.blogger.com/profile/12229578427522022392noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-11802292.post-50121659930272774502010-05-28T02:27:45.840-07:002010-05-28T02:27:45.840-07:00Hi, seeing the output of the django version brings...Hi, seeing the output of the django version brings up mixed feelings for me:<br />on the one hand, that is documented behavior and part of the django philosophy: "Template authors should not brake the application". On the other hand you want to see the error messages during testing/debugging. <br /><br />In django this is done normally with the settings module. There you would clearly distinguish between production and development cases. And you can (of cause) set the missing value errors to show up. <br />I have done this in a updated version <br /><br />http://pastebin.com/hWygByN6<br /><br />where the missing variable error is explicitly raised. <br /><br />One other thing with your test is that only one sort of error is tested. Django shows a different behavior, if a syntax error is found in the template. This is the second string in the posted code.Xubuntixhttps://www.blogger.com/profile/09279104137317355553noreply@blogger.comtag:blogger.com,1999:blog-11802292.post-72537457632318784822010-05-27T09:00:23.950-07:002010-05-27T09:00:23.950-07:00Here's my Django entry. It's a 2 file gist...Here's my Django entry. It's a 2 file gist. The error output is pretty worthless by design though. Template debugging is mostly useful when the full django stack is in use.<br /><br />Thanks Catherine!<br /><br />http://gist.github.com/415973Paulhttps://www.blogger.com/profile/17571325419513053776noreply@blogger.comtag:blogger.com,1999:blog-11802292.post-38202909341039043202010-05-27T07:37:52.299-07:002010-05-27T07:37:52.299-07:00The template:
http://paste.pocoo.org/show/218880/...The template: <br />http://paste.pocoo.org/show/218880/<br /><br />The code: <br />http://paste.pocoo.org/show/218887/<br /><br />And the output: <br />http://paste.pocoo.org/show/218888/Anonymoushttps://www.blogger.com/profile/16717232719055235292noreply@blogger.comtag:blogger.com,1999:blog-11802292.post-84879497884376977722010-05-27T06:18:39.724-07:002010-05-27T06:18:39.724-07:00I've posted a solution here: http://gist.githu...I've posted a solution here: http://gist.github.com/415785Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-11802292.post-39959429325561284782010-05-27T05:22:57.567-07:002010-05-27T05:22:57.567-07:00...and if you need to separate template and code, ......and if you need to separate template and code, here is the obvious change...<br /><br />http://pastebin.com/J7qF7g1GXubuntixhttps://www.blogger.com/profile/09279104137317355553noreply@blogger.comtag:blogger.com,1999:blog-11802292.post-43922521653793170722010-05-27T04:10:40.976-07:002010-05-27T04:10:40.976-07:00Hi, here is a django version (I hope it works...)
...Hi, here is a django version (I hope it works...)<br /><br />http://pastebin.com/YUq32sTzXubuntixhttps://www.blogger.com/profile/09279104137317355553noreply@blogger.com