Hei Glauco -

On Dec 6, 2007 9:39 AM, Glauco <[EMAIL PROTECTED]> wrote:
>
> Hi all,  i've found a solution to the problem of too-long-url.
> i hope this is useful
>
>
> Paginate function (next_page, top_page, end_page, next_page) create url
> based on how many field are in the form, using
> all data from request.
>
> cherrypy.request.params.copy()
>
>
> if a form has a lot of field this create an invalid URL, so i have
> create a work-around for this.
>
>
> before passing data to variable_encode i clear unuseful data from
> request with a simple recursive funct.

Hmmmmm... it may cause a problem here...
How can you know if a data is unuseful ?

Lets imagine this situation: paginate would render its links like:

/exposed_method/?a=11&b=&c=222&tg_data_pageno....

If I understood correctly you propose, the "b" parameter would be
omitted from paginates links...
Now, what if our exposed_method has this signature ?


def exposed_method(self, a, b, c=None):
    ...

"b" parameter must be informed... even if it is empty... otherwise you
will get a TypeError exception...



[]s
Roger

--~--~---------~--~----~------------~-------~--~----~
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