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 it.
Well, I think this is  very insecure, and I'd like you to give me a
different approach.
Anyway, If I'd like to do it this way, how could I do it, just for
learning purposes.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to