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 reference stuff?
>
> app = __import__('app_name',{},{},['models'])
> mods = getattr(app,'models')
> module = getattr(mods,'ModuleIWant')
>
> This actually works, but I'm not sure if it's the right way or the
> "python way".
>Do you want to reimplement or do you want to use get_model()?. If the answer is the latter you might find this article helpful: http://www.b-list.org/weblog/2007/nov/03/working-models/ Regards, -- Ramiro Morales --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

