response based on the data provided by views the following code is how the view for the home page should be writtenfrom django shortcuts import render def index(request)"""the home page for learning log""return render(request'learning_logs/index html'when url request matches the pattern we just defineddjango will look for function called index(in the views py file django then passes the request object to this view function in this casewe don' need to process any data for the pageso the only code in the function is call to render(the render(function here uses two arguments--the original request object and template it can use to build the page let' write this template writing template template sets up the structure for web page the template defines what the page should look likeand django fills in the relevant data each time the page is requested template allows you to access any data provided by the view because our view for the home page provided no datathis template is fairly simple inside the learning_logs foldermake new folder called templates inside the templates foldermake another folder called learning_logs this might seem little redundant (we have folder named learning_logs inside folder named templates inside folder named learning_logs)but it sets up structure that django can interpret unambiguouslyeven in the context of large project containing many individual apps inside the inner learning_logs foldermake new file called index html write the following into that fileindex html learning log learning log helps you keep track of your learningfor any topic you're learning about this is very simple file if you're not familiar with htmlthe tags signify paragraphs the tag opens paragraphand the tag closes paragraph we have two paragraphsthe first acts as titleand the second describes what users can do with learning log now when we request the project' base urlwe'll see the page we just built instead of the default django page django will take the requested urland that url will match the pattern '^$'then django will call the function views index()and this will render the page using the template contained in index html the resulting page is shown in figure - getting started with django