I am trying to use admin.LogEntry objects during a datamigration on Django 1.7
The \'django.contrib.admin\'
app is listed on INSTALLED_APPS
just check your "setting.py" in the installed apps section and make sure that you have added your app there :
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
**'you need to add your app here>>>>>>>>>>>>>>>>>>>>>>',
]**
I got the same error (but unrelated to the issue mentioned in question). I was using mysql db but there were no mysql client.
settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
# other details like name, user, host
}
}
I installed mysqlclient (In ubuntu & Python3):
sudo apt-get install libmysqlclient-dev
sudo apt-get install python3-dev
pip install mysqlclient
For me it shows
raise LookupError(message)
LookupError: No installed app with label 'admin'.
and I solve it by pip installing every requirements manually I m using ubuntu 16.04
In my case, app name wasn't added to the settings.py file under "INSTALLED APPS" dictionary
I also got this error after changing database from sqlite to postgresql and by installing psycog2 (which is used to connect django to postgre database) my error has gone.
pip install psycog2
For my case the LookupError was occuring because I had altered the models and added 'related_name' but had not run makemigrations and migrate.