Something in my python path must have changed because now I cannot run the.
python app/manage.py runserver
The output I get is
Unknown command: 'runserver'
Type 'manage.py help' for usage.
I've looked at my environment's PYTHONPATH and PATH variables, but I can't figure out why its not running.
The runserver command is a built-in subcommand of Django's manage.py file that will start up a development server for this specific Django project.
To verify the Django project, make sure your virtual environment is activated, then start Django's development server using the command python manage.py runserver . The server runs on the default port 8000, and you see output like the following output in the terminal window: Performing system checks...
Though the message in the console states that Ctrl+Break should be used to quit the server, it is not possible; one can only use Ctrl+F4 works to close the console.
I've found the answer to my question.
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.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With