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

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

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

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

dynamic url pattern

2009-03-26 Thread Alessandro Ronchi
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 without duplicate names 3 or 4 times.