You don't have permission to access that port

In my Django, when I try to run the server, it displays this error. What should be done to fix the error?enter image description here

What should be done to fix the error?[

You need admin rights try this:

sudo python runserver

This error message occurs because another process is currently using the same port. To resolve this issue, you can either change the port number in your Django development server, or stop the other process that's using the port and try again. Here's how to change the port in Django:

Open your file. Look for the following line: ALLOWED_HOSTS = [''] Change the port by modifying the following line: python runserver<new_port_number> Save and close the file. Restart the development server by running the command python runserver<new_port_number> Note: Replace <new_port_number> with the desired port number.

Back to Top