That error is telling me that you have a bug in your mako template...
probably referencing a variable that you forgot to pass in (thus it is
undefined).

Michael


On Sat, Mar 12, 2011 at 4:33 PM, AwaisMuzaffar <awais1...@googlemail.com>wrote:

>
> Hi,
>
> Thanks I will read into it more. I assumed it was the same thing.
>
> I have also tried:
>
> def blog_view(request):
>   variable = 'hello world'
>   return render_to_respomse('myblog:templates/pages/my-blog.mak',
> {'variable':variable}, request=request)
>
> And, I recieve the following error:
>
> URL: http://127.0.0.1:6543/my-blog/
>    File '/Users/Awais/virtualenv/lib/python2.6/site-packages/
> WebError-0.10.3-py2.6.egg/weberror/evalexception.py', line 431 in
> respond
>  app_iter = self.application(environ, detect_start_response)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/
> repoze.tm2-1.0b1-py2.6.egg/repoze/tm/__init__.py', line 23 in __call__
>  result = self.application(environ, save_status_and_headers)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/pyramid-1.0-
> py2.6.egg/pyramid/router.py', line 158 in __call__
>  response = view_callable(context, request)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/pyramid-1.0-
> py2.6.egg/pyramid/config.py', line 2916 in _requestonly_view
>  response = view(request)
> File '/Users/Awais/virtualenv/MyBlog/myblog/views.py', line 25 in
> pages_view
>  {'page':page}, request=request)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/pyramid-1.0-
> py2.6.egg/pyramid/renderers.py', line 111 in render_to_response
>  return helper.render_to_response(value, None, request=request)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/pyramid-1.0-
> py2.6.egg/pyramid/renderers.py', line 322 in render_to_response
>  result = self.render(value, system_values, request=request)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/pyramid-1.0-
> py2.6.egg/pyramid/renderers.py', line 318 in render
>  result = renderer(value, system_values)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/pyramid-1.0-
> py2.6.egg/pyramid/mako_templating.py', line 131 in __call__
>  result = template.render_unicode(**system)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/Mako-0.3.6-
> py2.6.egg/mako/template.py', line 292 in render_unicode
>  as_unicode=True)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/Mako-0.3.6-
> py2.6.egg/mako/runtime.py', line 575 in _render
>  **_kwargs_for_callable(callable_, data))
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/Mako-0.3.6-
> py2.6.egg/mako/runtime.py', line 607 in _render_context
>  _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/Mako-0.3.6-
> py2.6.egg/mako/runtime.py', line 633 in _exec_template
>  callable_(context, *args, **kwargs)
> File 'myblog_templates_pages____base_mak', line 27 in render_body
> File 'myblog_templates_pages_my_blog_mak', line 34 in render_body
> File '/Users/Awais/virtualenv/lib/python2.6/site-packages/Mako-0.3.6-
> py2.6.egg/mako/runtime.py', line 181 in __str__
>  raise NameError("Undefined")
> NameError: Undefined
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> pylons-discuss+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>

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

Reply via email to