title: django unprintable templatesyntaxerror object caused by urlconf?
body: <p>I'm trying to get a django project set up, and I seem to be having trouble with my urlconf.  I'm not sure what the deal is, and the error below isn't entirely helpful to me.  I don't think it really has anything to do with template rendering, actually, because I stepped through the execution path until just before the render_to_response function completes (which is where the urlconf seems to be causing an error) and the template objects are parsed correctly.</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2978, in _HandleRequest
      base_env_dict=env_dict)
    File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 411, in Dispatch
      base_env_dict=base_env_dict)
    File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2244, in Dispatch
      self._module_dict)
    File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2162, in ExecuteCGI
      reset_modules = exec_script(handler_path, cgi_path, hook)
    File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2058, in ExecuteOrImportScript
      exec module_code in script_module.__dict__
    File "C:\Users\Ben\Development\workspace\ringbot\src\main.py", line 52, in &lt;module&gt;
      main()
    File "C:\Users\Ben\Development\workspace\ringbot\src\main.py", line 49, in main
      util.run_wsgi_app(application)
    File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\util.py", line 97, in run_wsgi_app
      run_bare_wsgi_app(add_wsgi_middleware(application))
    File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\util.py", line 115, in run_bare_wsgi_app
      result = application(env, _start_response)
    File "C:\Python25\lib\site-packages\django\core\handlers\wsgi.py", line 241, in __call__
      response = self.get_response(request)
    File "C:\Python25\lib\site-packages\django\core\handlers\base.py", line 134, in get_response
      return self.handle_uncaught_exception(request, resolver, exc_info)
    File "C:\Python25\lib\site-packages\django\core\handlers\base.py", line 154, in handle_uncaught_exception
      return debug.technical_500_response(request, *exc_info)
    File "C:\Python25\lib\site-packages\django\views\debug.py", line 40, in technical_500_response
      html = reporter.get_traceback_html()
    File "C:\Python25\lib\site-packages\django\views\debug.py", line 114, in get_traceback_html
      return t.render(c)
    File "C:\Python25\lib\site-packages\django\template\__init__.py", line 178, in render
      return self.nodelist.render(context)
    File "C:\Python25\lib\site-packages\django\template\__init__.py", line 779, in render
      bits.append(self.render_node(node, context))
    File "C:\Python25\lib\site-packages\django\template\debug.py", line 81, in render_node
      raise wrapped
  TemplateSyntaxError: &lt;unprintable TemplateSyntaxError object&gt;
  </code></pre>
  
  <p>Here is my top-level urlconf:</p>
  
  <pre><code>from django.conf.urls.defaults import *
  
  urlpatterns = patterns('',
     (r'', include('pub.urls')),
  )
  </code></pre>
  
  <p>And pub.urls:</p>
  
  <pre><code>from django.conf.urls.defaults import *
  import pub
  
  urlpatterns = patterns('pub.views',
      (r'^$', 'index')
  )
  </code></pre>
  
  <p>and pub.views.index:</p>
  
  <pre><code># Create your views here.
  from django.shortcuts import render_to_response
  from django.http import HttpResponse
  import openidgae
  
  # this needs to be moved somewhere else, but for now it can live here
  def index(request):
      lip = openidgae.get_current_person(request, HttpResponse())
      resp = render_to_response('pub/index.html', {'lip': lip}) # exception thrown here
      return resp
  </code></pre>