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
Le lun 27/09/2004 à 18:44, Neil Schemenauer a écrit :
> On Mon, Sep 27, 2004 at 06:17:05PM +0200, Jkx wrote:
> > 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)
>
> It's not exactly clear to me what you want.  Perhaps you want to
> have a global instance.  Something like this:
>
>     # users.py
>
>     _q_exports = ['Users']
>
>     class View:
>         _q_exports = ['XXXXX', ]
>
>         def XXXXX(self,request):
>             ...
>
>     Users = View()
>
> Does that help?


Yes i can do something like this. But i get a bunch of different pages
(read View), and i don't want to put all in a single file. I don't have
a users.py because this is a users/__init__.py. And having a bunch of
method in __init__ isn't the best way I think.


This isn't really clear that's true.

I get this kind of layout:
users/__init__.py
users/AddUser.py
users/List.py
users/User.py  <-- This use the _q_lookup



Bye Bye ..


reply