Revision: 772
          http://rpy.svn.sourceforge.net/rpy/?rev=772&view=rev
Author:   lgautier
Date:     2010-01-03 09:05:10 +0000 (Sun, 03 Jan 2010)

Log Message:
-----------
Added directory to render files

Modified Paths:
--------------
    trunk/htdocs/build.py

Modified: trunk/htdocs/build.py
===================================================================
--- trunk/htdocs/build.py       2009-12-24 17:27:12 UTC (rev 771)
+++ trunk/htdocs/build.py       2010-01-03 09:05:10 UTC (rev 772)
@@ -1,6 +1,8 @@
-import time
+import os, time
 from jinja2 import Environment, FileSystemLoader
 
+render_dir = 'render'
+
 to_render = ('index.html',
              'contacts.html',
              'maillist.html',
@@ -39,8 +41,7 @@
 for tpl in to_render:
     print(tpl)
     template = env.get_template(tpl)
-
-    f = file(tpl, 'w')
+    f = file(os.path.join(render_dir, tpl), 'w')
     f.write(template.render(latestnews = newsdata[:8],
                             newslist = newsdata,
                             date = time.localtime()))


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to