On Apr 7, 12:41 pm, Dagvadorj Galbadrakh <dagvad...@gmail.com> wrote: > > Then, I thought that changing import_module is not necessary and > thought of importing the original app to the new instance in place, > like:
The very fact that you considered replacing import_module would make me a bit nervous :-/ > > ... > for app_name in settings.INSTALLED_APPS: > if (type(app_name) == types.TupleType): > a = app_name[0] + "." + app_name[1] > sys.modules[a] = __import__(app_namep[0]) > ... > not using sys.modules exactly, of course. > Perhaps you should review prior work in this area first, so as not to repeat work already done? As Alex Gaynor suggested, you could benefit from looking at this other thread: http://groups.google.com/group/django-developers/browse_frm/thread/4cca2086dd485879 which shows evidence of a greater awareness of at least some of the issues, without leaping straight to implementation details: as a result, it comes across as more considered. Regards, Vinay Sajip -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.