Last active
June 13, 2021 02:57
-
-
Save mozz100/6e00e70d911b000ff0e0 to your computer and use it in GitHub Desktop.
Change default port for django runserver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this at <yourapp>/management/commands/runserver.py. | |
# Override the value of the constant coded into django... | |
import django.core.management.commands.runserver as runserver | |
runserver.DEFAULT_PORT="8197" | |
# ...and then just import its standard Command class. | |
# Then manage.py runserver behaves normally in all other regards. | |
from django.core.management.commands.runserver import Command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment