On 17 nov, 01:28, "Ramiro Morales" <[EMAIL PROTECTED]> wrote:
> On Nov 16, 2007 8:18 PM, Grupo Django <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thanks a lot! get _model works.
> > Only one thing, I've been reading the code in te file django/db/models/
> > loading.py and I don't understand how it work
On Nov 16, 2007 8:18 PM, Grupo Django <[EMAIL PROTECTED]> wrote:
>
> Thanks a lot! get _model works.
> Only one thing, I've been reading the code in te file django/db/models/
> loading.py and I don't understand how it works, and now I need to know
> or I won't sleep :-)
>
> What should I do to ref
Thanks a lot! get _model works.
Only one thing, I've been reading the code in te file django/db/models/
loading.py and I don't understand how it works, and now I need to know
or I won't sleep :-)
What should I do to reference stuff?
app = __import__('app_name',{},{},['models'])
mods = getattr(ap
I'd love to know if there is a better method, but this is the best I
could come up with... pretty much the same thing you are doing, but
forcing the view functions to call 'import_feed' which can only load a
restricted set of modules.
AVAILABLE_FEEDS =
{'columbia':'columbia.search','glvar':'glvar
Hello,
In a view, I have:
from app.models import something
def my_view( request, mod_name ):
m = __import__('app.models',globals(),locals(),['something'] )
Now I'd like to do:
items = m.filter( ... )
for item in items:
...
What I need is to load a model dynamically and then use
5 matches
Mail list logo