Jorge Vargas wrote:
> take a look at cherrypy.request, in it you have a lot of convenience
> methods that will help you work this out like browser_url,
> request.path,etc.
I already had a look there but found nothing really convenient.
Looking at request.params does not help distinguishing between 'page'
and 'page/0' in my example.
Even evaluating request.path does not help much if I do not want to
require knowledge of the absolute path of the controller (I want my
method to be independent of that). Think of another example like this:
@expose()
def buffalo(type='buffalo', subtype='buffalo'):
...
Looking at request.path gives me something like
'myapp/buffallo/cow/buffallo/buffallo/buffallo'.
It is impossible to deduce the relative path to the controller from that
which could be '' or '../' or '../../' depending on whether my method
belongs to the cow controller or to a subcontroller with the name
'bufallo'. A constructed example, but I was looking for a simple
solution for the general case.
Am I missing an important method or property?
-- Chris
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---