I am new to Turbo Gears and have gone through the Wiki-20 tutorial. I
have a simple requirement:


1. Enter Text
Click on the above link and open a new page from entertext.kid. Here
is what I have done


I have added the following code in controller.py

   @expose(template='deceptive.templates.entertext')
    def index(self,pagename):
         redirect("/"+"entertext")

In the page.kid from where my link exists

<p><a href="entertext?">1. Enter Text</a></p>


When I start the server I am getting the following error:


500 Internal error

The server encountered an unexpected condition which prevented it from
fulfilling the request.

Page handler: <bound method Root.index of <deceptive.controllers.Root
object at 0x0167B610>>
Traceback (most recent call last):
  File "c:\python25\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy
\_cphttptools.py", line 121, in _run
    self.main()
  File "c:\python25\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy
\_cphttptools.py", line 264, in main
    body = page_handler(*virtual_path, **self.params)
TypeError: index() takes at least 2 arguments (1 given)


Any help appreciated

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
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