Author: joes
Date: Thu Mar 20 15:33:25 2014
New Revision: 1579666
URL: http://svn.apache.org/r1579666
Log:
expose snippet templates to django
Modified:
thrift/cms-site/trunk/lib/view.pm
Modified: thrift/cms-site/trunk/lib/view.pm
URL:
http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/view.pm?rev=1579666&r1=1579665&r2=1579666&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Thu Mar 20 15:33:25 2014
@@ -17,7 +17,8 @@ sub thrift_preprocessor {
$args{content} =~ s{\[snippet:([^\]]+)\]}
{
my $template = $1;
- my %a = map {split /=/, $_, 2} split /:/, $template;
+ my %a = map {split /=/, $_, 2} split /:/,
+
view->can("Template")->($template)->render(\%args);
$args{$key} = ASF::Value::Snippet->new(
type => "git",
repo => "thrift.git",