Forums

Django Polls Tutorial: Error: That port is already in use.

I am trying to do the Django polls tutorial. I have the rocketship stating that Django is installed

https://pythontested.pythonanywhere.com/

when I am following the tutorial on the Django site to create a poll I get this error below.. any help please?

13:01 ~/mysite $ python manage.py runserver Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, session s. Run 'python manage.py migrate' to apply them. October 19, 2024 - 13:03:51 Django version 4.0.6, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Error: That port is already in use.

You cannot run the development server in a PythonAnywhere console. You need to create a web app and access your site through the URL provided for the web app.

Thanks Glenn. I am a PHP coder and am new to Python. I am following the Django tutorials closely. I do not understand what you mean when you say "You need to create a web app"... that is what I am trying to do.

I have a bash command line and entered the code "python manage.py runserver" as per the Django tutorial.

Could you please elaborate a little more on what you mean please?