I've created a project call TemplateDemo. When I visit the page (/greeting/index/) it shows the variable as {$name} instead of as the variable I created in the code. Here is my controller code:
And here is my greeting.html code:Code:import logging from pylons import request, response, session, tmpl_context as c from pylons.controllers.util import abort, redirect_to from templatedemo.lib.base import BaseController, render log = logging.getLogger(__name__) class GreetingController(BaseController): def index(self): name = 'Pylons Developer' return render('/greeting.html', extra_vars={'name' : name})
What gives? Its as if the template isn't being rendered.Code:<html> <head> <title>Greetings</title> </head> <body> <h1>Greetings</h1> <p>Hello {$name}!</p> </body> </html>



Bookmarks