Creating Views and Testing the App
- Open
home/views.py
-
- If you are following this lab from our previous lab Getting Started With Django, the
views.pyfile may look like this: 
- Modify the
views.pylike this to render thetemplates/home/home.htmlfile when the request is made on the server:

- The final
views.pyfile will look like this: 
- If you are following this lab from our previous lab Getting Started With Django, the
- Run server using
manage.pyto see the homepage onhttp://127.0.0.1:8000/
- Check if the static files (Images in this case) are accessible:

13
