Reputation: 535
I'm having some trouble with my Django project (Django version 1.5.2). In particular, it doesn't seem to find the apps inside it. When I try to do some action from manage.py related to a particular app, like testing, I get the following error message:
ImproperlyConfigured: app with label app_name could not be found.
As this has been asked before, I browsed through other threads, but the solutions don't seem to be working for me. In particular, I've tried:
Checking that every app, (and for the apps that are inside subfolders also those middle folders) has the files "__init__.py" and "models.py" in it.
Checking that all apps are listed in the "settings.py" file inside the subfolder named the same as the project's folder. The INSTALLED_APPS variable looks something like this:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'app_name1',
'app_name2',
'subfolder.app_name3',
'subfolder.app_name4',
...
)
Sync-ing the DB (it doesn't trigger any error).
Deleting all __pycache__ folders and pyc files.
The strange thing is that a few weeks ago everything was working fine, and I don't remember doing any major change that could cause that. I'm sure I'm missing something obvious, but at the moment I can't seem to figure out what it is...
Upvotes: 0
Views: 552
Reputation: 535
Solved. Turns out my Django installation was broken, probably because of the antivirus deleting files it doesn't like (has happened before). Reinstalling Django seems to have solved the issue. I now run Django 1.6, I hope it doesn't generate many problems given that I started development with the version 1.5.2.
Upvotes: 1