In this lesson, you’re going to create your first Django app. The command you need to use is python manage.py startapp projects
. You’re going to start by creating this app and will later flesh it out, as you saw in the first section of this course.
Head over to projects
and see your page running. You’ll get a message telling you that this site can’t be reached. You stopped the development server, so it’s not currently running. You can start solving this problem by opening up an extra terminal tab and starting your development server with python manage.py runserver
and just keeping it running.
When you reload the page, you still get an error message. It turns out that the URL isn’t pointing to anything. The error message points you toward portfolio.urls
. Take a look at urls.py
in the portfolio
folder.
reblark on Oct. 17, 2019
In this presentation and in the one from Django itself, you frequently forget to mention that you turned off the server. That is a terrible mistake for the viewer because as long as the server is running, the viewer will not get the result of localhost:8000/projects and he/she will waste of lot of time trying to figure out why they still get the other error message. You need to carefully communicate everything you do. Leaving out that little bit of information is, well…I am biting my tongue.