0

I was upgrading from Django 1.6 to 1.7. Python 2.7 is installed which is compatible with Django 1.7. While I was deprecating with the code "python -Wall manage.py test", I got the following error message:

Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-
packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 123, in create
    import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named dashboard

Reading the Django 1.7 release note, I understood "django.utils.module_loading.import_by_path" has been changed to "import_string()". I couldn't figure out where can I find this piece of code. If anyone can give me a guideline how to deal with this issue would be appreciated.

Dhia
  • 10,119
  • 11
  • 58
  • 69
Dubar Alam
  • 79
  • 1
  • 10
  • I will be happy to any relevant question? – Dubar Alam May 10 '17 at 18:11
  • Hm, by chance, do you have any directories/files named apps? :-) (we had to rename our apps. structure to app. - on the plus side: one char less to type) Django 1.7 introduced apps.py / Applicacations: https://docs.djangoproject.com/en/1.11/ref/applications/ – ACimander May 10 '17 at 18:16
  • For example my project name "dbms"; I don't have anything named apps in the directory dbms/... BTW what did you mean by "we had to rename our apps. structure to app. - on the plus side: one char less to type"? – Dubar Alam May 10 '17 at 18:26
  • did you check every app that you added to settings.INSTALLED_APPS? I would start to remove half of the apps, check if the error is gone, if yes, one of the apps in the other half is the culprit, if not, reduce the installed_apps even further. – ACimander May 10 '17 at 18:29
  • 1
    Thanks a lot! I located the app 'grappelli.dashboard'. There was no dashboard file in the dbms/grappelli/ directory. – Dubar Alam May 10 '17 at 18:38
  • mind to accept the answer so that this question won't show up as unanswered for the rest of us folk here? :) – ACimander May 10 '17 at 18:41
  • Sorry for my ignorance. How can I accept the answer? – Dubar Alam May 10 '17 at 18:45

1 Answers1

0

Okay, this one is figured out.

"Thanks a lot! I located the app 'grappelli.dashboard'. There was no dashboard file in the dbms/grappelli/ directory"

ACimander
  • 1,852
  • 13
  • 17