Re: get function list inside module was: Re: dynamic url pattern

2009-03-26 Thread Karen Tracey
On Thu, Mar 26, 2009 at 12:33 PM, Alessandro wrote: > On Thu, Mar 26, 2009 at 4:44 PM, Alessandro > wrote: > >> >> Is it possible to get a list of function names inside a module? > > > I need to know the names of the functions in a module. is it possible ? > That's pretty much a pure python ques

get function list inside module was: Re: dynamic url pattern

2009-03-26 Thread Alessandro
On Thu, Mar 26, 2009 at 4:44 PM, Alessandro wrote: > > Is it possible to get a list of function names inside a module? I need to know the names of the functions in a module. is it possible ? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com S

Re: dynamic url pattern

2009-03-26 Thread Tim Chase
Alessandro Ronchi wrote: > I want to make a regxep in my urls.py that takes the name of the view from > the url. > Something like: > > > (r'^views/(?P\w+)/', 'myproject.database.reports.' + name), > > is it possible? I've a lot of views with the same rule and I want to make > them be available

Re: dynamic url pattern

2009-03-26 Thread Alessandro
On Thu, Mar 26, 2009 at 4:21 PM, Thomas Guettler wrote: > # views.py (untested) > def wrapper(request, name): >module=__import__("myproject.database.reports.%s" % name, globals(), > locals(), [name]) >method=getattr(module, name) >return method(request) > this works: def wrapper(req

Re: dynamic url pattern

2009-03-26 Thread Thomas Guettler
Alessandro Ronchi schrieb: > I want to make a regxep in my urls.py that takes the name of the view from > the url. > Something like: > > > (r'^views/(?P\w+)/', 'myproject.database.reports.' + name), > > is it possible? I've a lot of views with the same rule and I want to make > them be availabl