Re: admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-24 Thread Ludvig Ericson
> So, what we want the autodiscover to do is to run > from import admin > which would be > mod = __import__(appname, {}, {}, "admin") I should proof-read more. from import admin is the same as admin = __import__(appname, {}, {} ["admin"]).admin _but_ our interest lies within executing

Re: admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-24 Thread Ludvig Ericson
On Oct 23, 2008, at 16:53, Kurt wrote: > > Could always use the super hacky "check the ImportError message for > the name of the admin module" to decide whether to reraise the error > or not. Please don't. The solution lies within the fourth argument to __import__. The statement from x.y

Re: admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-23 Thread Kurt
Could always use the super hacky "check the ImportError message for the name of the admin module" to decide whether to reraise the error or not. On Oct 22, 11:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Waylan, while discussing this with Clint, I came to the conclusion > that we will

Re: admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-22 Thread [EMAIL PROTECTED]
Waylan, while discussing this with Clint, I came to the conclusion that we will still face this problem with this solution. However, IMO, that is indicative of an upstream problem and should be reported up stream, once it is fixed there this solution will continue to work correctly for both

Re: admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-22 Thread Waylan Limberg
On Wed, Oct 22, 2008 at 7:16 PM, Clint Ecker <[EMAIL PROTECTED]> wrote: > > Hi all, > I've opened a ticket on this matter (http://code.djangoproject.com/ > ticket/9427) but the gist of it is this: > [snip] > > I'm throwing this out there just to get a wider eye on the patch just > in case there

admin.autodiscover() uses method that cannot find files inside of eggs: possible fix included

2008-10-22 Thread Clint Ecker
Hi all, I've opened a ticket on this matter (http://code.djangoproject.com/ ticket/9427) but the gist of it is this: I have a django application that is packaged as an egg. Inside this package are many files which include an admin.py. It would appear that the rest of django finds the files