When I'm in such a situation, I do something like this: from myapp.module1 import views as mod1views from myapp.module2 import views as mod2views from myapp.module3.module4 import views as mod4views
...and later in your code, just do something like mod1views.special_view() mod2views.awesome_view() mod4views.crummy_view() similarly, if you really want to use "getattr", you should be able to do something like this handler = getattr(mod1views, endpoint) (hopefully I understood what you were asking about and responded satisfactorily. On Dec 2, 6:11 pm, Khaoz <[EMAIL PROTECTED]> wrote: > My project structure will have the following structure: > > myapp.module1.views > myapp.module2.views > myapp.module3.module4.views > > And growing ... > > I will use the @expose decorator to keep the url mapping with the > actions in views. > > How to avoid to import a lot of views, line by line ? > > And how to do this: > > handler = getattr(views, endpoint) > > With diferent views ? > > Ty --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pocoo-libs" 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/pocoo-libs?hl=en -~----------~----~----~----~------~----~------~--~---
