import django.core.management.commands.runserver as runserver
runserver.DEFAULT_PORT = '8001'
import os
dir_path = os.path.splitext(os.path.relpath(__file__))[0]
python_path = dir_path.replace(os.sep, '.')
print('Using %s with default port %s' % (python_path, runserver.DEFAULT_PORT))
from django.core.management.commands.runserver import Command
django change default runserver port