Django 1.4 Unknown command: 'runserver'
Looking through the manager.py
code and django.core.management
I can come up with some suggestions.
First, check if the file <some_path>/django/core/management/commands/runserver.py
exists.
Second, run:
>>> import sys
>>> sys.path
If the aforementioned <some_path>
is not in this list than you must set the PYTHONPATH
variable.
Third, (and that's the longest of all shots) if you have changed the DEFAULT_PORT
of runserver
, try changing it back to 8000
.
I've found the answer to my question.
- If you've got an error in your settings, manage.py will swallow the exception and report as if the command does not exist.
- This lead me down the path of incorrectly assuming my python path or venv environment was messed up.
If you want to diagnose this issue, run...
python app/manage.py help
... and it will show the exception. This, of course, was what was recommended by the django shell after it had told me that the command was not found.
This is clearly a bug in Django 1.4. It seems to me, an Exception should be reported regardless of what management command you run.