durusmail: quixote-users: URL / _q_export / _q_lookup
URL / _q_export / _q_lookup
2004-09-27
2004-09-27
2004-09-27
2004-09-27
URL / _q_export / _q_lookup
Jkx
2004-09-27
Hy everybody. I run into an issue with the way
quixote handler request. I guess i miss something
but don't find a way to solve this.


For a couple of things, I wrote something like this:

-------------------------------------------------------
# User.py
def _q_lookup (request, component):
    """ catch url like  users/User/foo """
    userID = component
    view = View(userID)
    return view

class View:
    _q_export = ['delUser',..]

    def delUser(self,request):
        ...
---------------------------------------------------------

So calling http://localhost:8080/users/User/foo/delUser
for exemple call the method delUser on the right object
and that's fine.



Right now, i want to do the same stuff without the _q_lookup.
I mean. I want to have something like this

-----------------------------------------------------------
#Users.py
class View:
    _q_export = ['XXXX', ]

    def XXXXX(self,request):
        ...

And i want to have a url like http://localhost:8080/users/Users/XXXX
(read call the method XXXX on the View of module Users)

But _q_lookup returns a instance so the try_public call the methods
without trouble. Right now I can find a way to do this nicely.

What sould I do ? (The main reason why I don't want to work at instance
level with View object instead of module level (as usual in quixote) is
that this view are some mixing pages without some usufull inheritance.



Thanks for any remarks,
I been working on this since a while and don't find a way to fix that
the nicer way.


Bye Bye






reply