2008/4/28 Cecil Westerhof <[EMAIL PROTECTED]>:

> In my controller I have:
>     entries = BlogEntryController()
>     SMS     = SMSController()
>     log.info(entries)
>     log.info(SMS)
>
> In the output from starting the application I have:
>     2008-04-28 11:00:58,969 tblog.controllers INFO
> <tblog.BlogEntryController.controllers.BlogEntryController object at
> 0x876d24c>
>     2008-04-28 11:00:58,970 tblog.controllers INFO
> <tblog.SMSController.controllers.SMSController object at 0x89fe88c>
>
> So I would think that the subcontrollers are both good defined.
>
> Fetching /entries is no problem, but when I try to fetch /SMS I get:
>     2008-04-28 11:04:25,247 cherrypy.msg INFO HTTP: Page handler: "The
> path '/SMS' was not found."
>     Traceback (most recent call last):
>       File
> "/usr/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py",
> line 121, in _run
>         self.main()
>       File
> "/usr/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py",
> line 256, in main
>         page_handler, object_path, virtual_path =
> self.mapPathToObject(path)
>       File
> "/usr/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py",
> line 326, in mapPathToObject
>         raise cherrypy.NotFound(objectpath)


I think there is an error in generating the error log.
I copied the complete BlogEntries controller and renamed it to SMSControler.
That worked fine.
Then I added:
    @expose(template='kid:tblog.SMSController.templates.testing')
    def testing(self, **kw):
        """handle front page"""
        log.info('parameters SMS/testing: %s' % (kw))
        return dict(modelname = self.modelname)

When I then try to fetch /sms/testing it gives in the log:
#####
2008-04-28 12:42:46,019 cherrypy.msg INFO HTTP: Page handler: <function
_wrapper at 0x8dfd87c>
Traceback (most recent call last):
  File
"/usr/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py",
line 121, in _run
    self.main()
  File
"/usr/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py",
line 264, in main
    body = page_handler(*virtual_path, **self.params)
  File
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/identity/conditions.py",
line 288, in _wrapper
    return fn(*args, **kw)
  File "<string>", line 3, in testing
  File
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/controllers.py",
line 365, in expose
    *args, **kw)
  File "<string>", line 5, in run_with_transaction
  File
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/database.py",
line 356, in so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/controllers.py",
line 380, in <lambda>
    mapping, fragment, args, kw)))
  File
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/controllers.py",
line 421, in _execute_func
    return _process_output(output, template, format, content_type, mapping,
fragment)
  File
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/controllers.py",
line 87, in _process_output
    fragment=fragment)
  File
"/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/view/base.py",
line 129, in render
    return engine.render(**kw)
  File
"/usr/local/lib/python2.5/site-packages/TurboKid-1.0.4-py2.5.egg/turbokid/kidsupport.py",
line 182, in render
    tclass = self.load_template(template)
  File
"/usr/local/lib/python2.5/site-packages/TurboKid-1.0.4-py2.5.egg/turbokid/kidsupport.py",
line 151, in load_template
    tclass = mod.Template
AttributeError: 'module' object has no attribute 'Template'
#####

So I think that when the /sms/ page not can be made, you get a wrong error
in the log.

In testing.kid I have:
#####
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:py="http://purl.org/kid/ns#
"
    py:extends="'sitetemplate'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"
py:replace="''"/>
<title>SMS/MMS functionaliteiten</title>
</head>
<body>
<h1>Alleen een test pagina om te kijken of het werkt</h1>
</body>
</html>
#####

What is wrong here?

-- 
Cecil Westerhof

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to turbogears@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to