On 19 April 2007 (Thu), Armin Ronacher wrote:
> Indeed I did. In SVN there is a plugin available but it requires a
> small modification in pylons so far. I talked with Ben Bangert about
> this issue, hopefully it makes it into the release version.

Thanks, that worked. I was able to use the plugin with Pylons-0.9.5 with no 
modifications at all, only had to tweak the project like this:

--- config/environment.py.orig  2007-04-20 23:25:48.000000000 +0600
+++ config/environment.py       2007-04-20 23:31:24.000000000 +0600
@@ -25,4 +25,4 @@
     # any Pylons config options
     
     # Return our loaded config object
-    return pylons.config.Config(tmpl_options, map, paths)
+    return pylons.config.Config(tmpl_options, map, paths, strict_c=True)
--- config/middleware.py.orig   2007-04-20 23:37:02.000000000 +0600
+++ config/middleware.py        2007-04-20 23:27:34.000000000 +0600
@@ -29,8 +29,12 @@
 
     # Load our Pylons configuration defaults
     config = load_environment(global_conf, app_conf)
-    config.init_app(global_conf, app_conf, package='pylonshello')
-        
+    config.init_app(global_conf, app_conf, package='pylonshello', 
template_engine='jinja')
+    from jinja import FileSystemLoader
+    config.add_template_engine('jinja', '', {
+        'jinja.loader': FileSystemLoader('pylonshello/templates')
+    })
+
     # Load our default Pylons WSGI app and make g available
     app = pylons.wsgiapp.PylonsApp(config, helpers=pylonshello.lib.helpers,
                                    g=app_globals.Globals)

Would be nice if it worked out of the box in the next Pylons release and 
become a default some day. ^_^ Jinja templates are clean and simple, while 
Myghty (and Mako) language looks way like PHP. :-P

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to