Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Page handler url matching problem
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Voltron  
View profile  
 More options Oct 26, 4:33 pm
From: Voltron <nhy...@googlemail.com>
Date: Mon, 26 Oct 2009 13:33:04 -0700 (PDT)
Local: Mon, Oct 26 2009 4:33 pm
Subject: Page handler url matching problem
I have an application mounted as test. This has a page handler called
foo. I cant seem to get the default handler to match this URL.:

http://localhost:8080/test/foo?action=new

This was the handler I used:

 @cherrypy.expose
 def default(self, *args, **kwargs ):

This always error out with this traceback:

Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\cherrypy\_cprequest.py", line
606, in respond
    cherrypy.response.body = self.handler()
  File "C:\Python26\lib\site-packages\cherrypy\_cpdispatch.py", line
27, in __call__
    test_callable_spec(self.callable, self.args, self.kwargs)
  File "C:\Python26\lib\site-packages\cherrypy\_cpdispatch.py", line
130, in test_callable_spec
    "parameters: %s" % ", ".join(extra_qs_params))
HTTPError: (404, 'Unexpected query string parameters: action')

Is there something I am missing?

Thanks


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dundeemt  
View profile  
 More options Nov 8, 10:01 am
From: dundeemt <dunde...@gmail.com>
Date: Sun, 8 Nov 2009 07:01:56 -0800 (PST)
Local: Sun, Nov 8 2009 10:01 am
Subject: Re: Page handler url matching problem
--code--
class MyRouter2:
    @cherrypy.expose
    def default(self, *args, **kwargs):
        return '[%s]:[%s]' % (args,kwargs)

cherrypy.tree.mount(MyRouter2(), "/", None)
cherrypy.engine.start()
cherrypy.engine.block()

--request--
http://localhost:8080/test/foo?action=new

--response--
[('test', 'foo')]:[{'action': 'new'}]

--version info--
cherrypy 3.1.2
python 2.6.2

working here

Best,
Jeff

On Oct 26, 2:33 pm, Voltron <nhy...@googlemail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google