51👍
✅
Run this in manage.py shell:
from django.conf import settings; 'django_extensions' in settings.INSTALLED_APPS
If it doesn’t return True, then it means that you didn’t add ‘django_extensions’ properly in INSTALLED_APPS, and that would be the only reason why Django doesn’t find the command.
👤jpic
6👍
Actually, if you look at your manage.py’s code, you will notice that it sets DJANGO_SETTINGS_MODULES according to your current site: let say “mysite.settings”.
If you want your manage.py to list additional extensions (e.g. ones from django-extensions or django-evolution) then you must add your project-root’s folder to your python path, if not you will only get the bascc manage.py commands.
- [Django]-Python regex for integer?
- [Django]-Multi-tenant Django applications: altering database connection per request?
- [Django]-Django project base template
3👍
I had it under everything else in settings.py
INSTALLED_APPS
. Moving it at the top fixed it:
From
INSTALLED_APPS = [
...
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
]
TO
INSTALLED_APPS = [
'django_extensions',
...
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
- [Django]-Django Order By Date, but have "None" at end?
- [Django]-Python/Django debugging: print model's containing data
- [Django]-A better way to restart/reload Gunicorn (via Upstart) after 'git pull'ing my Django projects
Source:stackexchange.com