Ahh sorry. Yea for my projects too, I find it to be the most simple setup. On Sun, Mar 2, 2008 at 11:32 AM, Rajeev J Sebastian < [EMAIL PROTECTED]> wrote:
> > Hello Micheal, > > I guess my very terse response caused some misunderstanding. > > I meant, we (i.e., dinamis.com in our inhouse projects) put all our > admin related stuff for each app in an <app>/admin.py and load it at > startup. > > Sorry for the misunderstanding I caused. > > Regards > Rajeev J Sebastian > > On Sun, Mar 2, 2008 at 8:43 PM, Michael <[EMAIL PROTECTED]> wrote: > > > > On Sun, Mar 2, 2008 at 9:34 AM, Rajeev J Sebastian > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > On Sun, Mar 2, 2008 at 3:29 AM, Michael Newman <[EMAIL PROTECTED]> > > wrote: > > > > > > > > To elaborate I just threw 4 lines of code into my contrib.admin > > > > __init__: > > > > from django.conf import settings > > > > for a in settings.INSTALLED_APPS: > > > > try: > > > > __import__(a + '.admin') > > > > except ImportError: > > > > pass > > > > Which will make my life a lot easier. I can't say I have thought > about > > > > every possible problem, but having it so that when someone puts > > > > contrib.admin in their installed apps and django automatically > starts > > > > looking for admin.py in installed apps sounds good to me. > > > We already do this. > > > > > > > Unless I am missing something, I don't see where this is being done. The > > installed models are run through that right now the system involves > > importing the admin in that situation. I am still hitting error after > error > > in my app that things are already registered due to relationships inside > my > > models that I don't see how to avoid. > > > > I think that the second solution that Brian proposed is the best > solution, > > but, to me, it sounds strange to accept the fact that a model might be > > imported twice and ignored the second time. The admin only needs to be > > imported once, so I don't understand why it should be in an import > statement > > in code that might need to be executed several times. > > > > Please guide me where I am wrong, > > > > Thanks, Michael > > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~----------~----~----~----~------~----~------~--~---