django-admin2 icon indicating copy to clipboard operation
django-admin2 copied to clipboard

AttributeError: 'module' object has no attribute 'default'

Open globophobe opened this issue 10 years ago • 3 comments

Where did "default" go? I can see it very clearly in djadmin2/init.py

My urls.py

import djadmin2 print dir(djadmin2) djadmin2.default.autodiscover()

Output from manage.py trimmed...

['ISO_8601', 'VERSION', 'author', 'builtins', 'doc', 'file', 'name', 'package', 'path', 'version', 'absolute_import', 'apiviews', 'division', 'filters', 'forms', 'models', 'permissions', 'settings', 'unicode_literals', 'utils', 'viewmixins']

File "/urls.py", line 8, in djadmin2.default.autodiscover() AttributeError: 'module' object has no attribute 'default'

globophobe avatar Dec 25 '13 15:12 globophobe

Your urls.py is

import djadmin2
print dir(djadmin2)
djadmin2.default.autodiscover()

pydanny avatar Jan 02 '14 23:01 pydanny

I've just come across the same issue, turned out debug_toolbar has been conflicting here somehow. Removing it from INSTALLED_APPS did the trick. It was DDT 1.0 btw.

adlorenz avatar Jan 18 '14 22:01 adlorenz

@andrewsmedina @galuszkak I believe we should get rid of admin.autodiscover()

auvipy avatar Nov 14 '16 07:11 auvipy