On 10/23/05, Jeff Watkins <[EMAIL PROTECTED]> wrote:
>
> I just committed the code for the TurboGears identity management
> support (revision 89). And because this is such new code, I thought
> it might be helpful to include a short How To for getting everything
> up and running.
>
> The How To is available at:
> http://metrocat.org/nerd/2005/10/identity-management-for-turbogears

This looks really nice, but I'm having a spot of difficulty with the
how-to, running against an otherwise-happy svn installation (rev 91).

Adding the "@identity.require( group="admin" )" decorator to any
exposed method (secured, index, what have you) results in this
traceback:

-----
Traceback (most recent call last):
  File 
"C:\Python24\Lib\site-packages\CherryPy-2.1.0_rc2-py2.4.egg\cherrypy\_cphttptools.py",
line 271, in run
    main()
  File 
"C:\Python24\Lib\site-packages\CherryPy-2.1.0_rc2-py2.4.egg\cherrypy\_cphttptools.py",
line 502, in main
    body = page_handler(*args, **cherrypy.request.paramMap)
  File "c:\src\turbogears\trunk\turbogears\controllers.py", line 128, in newfunc
    return controllers._process_output(tg_format, output, html)
  File "c:\src\turbogears\trunk\turbogears\controllers.py", line 36,
in _process_output
    output = view.render(output, tg_format, template=template)
  File "c:\src\turbogears\trunk\turbogears\view.py", line 92, in render
    tclass = lookupTemplate(template)
  File "c:\src\turbogears\trunk\turbogears\view.py", line 68, in lookupTemplate
    mod = kid.load_template(tfile, name=classname)
  File 
"C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\__init__.py",
line 118, in load_template
    code = template.compile(dump_code=cache)
  File 
"C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\compiler.py",
line 87, in compile
    code = self.code
  File 
"C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\compiler.py",
line 101, in code
    self._code = py_compile(self.python, pyfile, 'exec')
  File 
"C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\compiler.py",
line 108, in python
    py = kid.parser.parse_file(self.kid_file, self.encoding)
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\parser.py",
line 55, in parse_file
    return parse(source, encoding, filename=filename)
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\parser.py",
line 44, in parse
    return parser.parse()
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\parser.py",
line 71, in parse
    self.proc_stream(self.module_code)
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\parser.py",
line 126, in proc_stream
    for (ev, item) in self.stream:
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\pull.py",
line 152, in _track
    for p in stream:
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\pull.py",
line 179, in _coalesce
    for ev, item in stream:
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\pull.py",
line 321, in __iter__
    for (ev, stuff) in self._expat_stream():
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\pull.py",
line 293, in _expat_stream
    feed(data)
  File "C:\Python24\Lib\site-packages\kid-0.7adev_r186-py2.4.egg\kid\pull.py",
line 361, in feed
    raise e
ExpatError: unbound prefix: line 4, column 7
-----

What it's choking on is, strangely, the py:extends attribute of the
html element:

-----
<html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:py="http://purl.org/kid/ns#";
      py:extends="'master.kid'">
-----

Any ideas?

--
Tim Lesher <[EMAIL PROTECTED]>

Reply via email to