In the previous lesson, you set up the routes that directed your request all the way to your views.py
file. You got an error telling you that this views doesn’t actually exist. Now, you need to create a view.
Go to views.py
, where you already have some imports as well as a helpful message to create your views here. Create your new function, project_list()
:
# Create your views here.
def project_list(request):
pass
Now you’ve got a new error message that you can use to fix your function!
Paul on Oct. 28, 2019
Something to note here: When I was building out this new view, I wasn’t getting the same error messages in my browser, I was seeing a
PageNotFound
error instead.After getting to know this “friend” a little better I realized that I had the wrong url in my address bar. I was still at the home page of
http://127.0.0.1:8000/
instead of where Martin was actually at, which washttp://127.0.0.1:8000/projects/