On Oct 20, 12:26 pm, Will Boyce <[EMAIL PROTECTED]> wrote: > I was throwing together a (supposedly quick!) project today to gather > some information from customers, however I hit a stumbling block a > while back and I now feel like I'm banging my head on a brick wall.. > > I've modified the syncdb process to be a bit more verbose: > > ..snip.. > Loading granular_permissions > No models found for <module 'granular_permissions' from '/home/wrboyce/ > ibd/granular_permissions/__init__.pyc'> > ..snip.. > > But when I try the same from the shell: > > >>> app_name = 'granular_permissions' > >>> mod = __import__(app_name, {}, {}, ['models']) > >>> mod > > <module 'granular_permissions' from '/home/wrboyce/ibd/ > granular_permissions/__init__.pyc'>>>> getattr(mod, 'models') > > <module 'granular_permissions.models' from '/home/wrboyce/ibd/ > granular_permissions/models.pyc'>>>> hasattr(mod, 'models') > > True > > This is making absolutely no sense to me. The file exists all the > time, why can't I import it all the time!?
Sounds like a circular dependency problem to me. Is your app trying to import something that needs granular_permissions itself? -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---