Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change the port exactly? #46

Open
morenoh149 opened this issue Jan 7, 2020 · 5 comments
Open

how to change the port exactly? #46

morenoh149 opened this issue Jan 7, 2020 · 5 comments

Comments

@morenoh149
Copy link

I want to change the ports used. What do I run exactly?

I tried

python manage.py livereload --port 9090
python manage.py runserver 9000 --livereload-port=9090

the second complains manage.py runserver: error: unrecognized arguments: --livereload-port 9090

@kbuilds
Copy link
Collaborator

kbuilds commented Oct 11, 2021

I am also running to this same issue. The --livereload-port argument does not seem to be working

@kbuilds
Copy link
Collaborator

kbuilds commented Oct 11, 2021

Looks like I found the answer to this exact issue.

From the docs:

Add 'livereload' to the INSTALLED_APPS, before 'django.contrib.staticfiles' if this is used:

Looks like you are not installing this above the "staticfiles" app

@kbuilds
Copy link
Collaborator

kbuilds commented Oct 11, 2021

After some further investigation, the only way that I could reliably set the port to affect the script in the middleware and the livereload server itself was in the settings.

I added LIVERELOAD_PORT = 1234 in my settings.

@morenoh149
Copy link
Author

so the docs need updating

@kbuilds
Copy link
Collaborator

kbuilds commented Oct 28, 2021

If I were the maintainer, I would remove the --livereload-port argument from the ./manage.py command altogether. I think that it adds confusion, because it can only possibly control the port that the Django development server knows about. The Tornado server, which I think is what runs when you do ./manage.py livereload doesn't know what port you specified in the other ./manage.py command.

That's why I think it makes sense to just drop these parameters, and just set all of these settings under the settings.py file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants