pythondjangoweb-deploymentbackend

python manage.py runserver doesn't display anything


I used to work with django and I didn't face this problem in the past, Then I shifted for a while to Laravel ( and sure I changed a lot of things in the windows which I don't remember ).

and now when I hit python manage.py runserver .. nothing happen and the shell seems as it hanged . hover once I hit crt + C .the normal window suddenly appear that says :

You have 15 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them. January 08, 2019 - 14:16:30 Django version 2.1.1, using settings 'django_project.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.

However I am able to go to http://127.0.0.1:8000/ and I have the welcome page of django with this line added enter image description here

It sounds crazy I know , please excuse me cause I am a newbie and thanx in advance


Solution

  • Looks like you've to apply migrations.

    You've just to run what he says:

    python manage.py migrate
    

    I think it's better to look at the documentation before you proceed: you've to understand how models work in Django. Take a look to the documentation first. And my advice is to follow the "first app" tutorial. Go here