the url for new page should be short and descriptiveso when the user wants to add new topicwe'll send them to here' the url pattern for the new_topic pagewhich we add to learning_logsurls pyurls py --snip-urlpatterns --snip-page for adding new topic url( '^new_topic/$'views new_topicname='new_topic')this url pattern will send requests to the view function new_topic()which we'll write next the new_topic(view function the new_topic(function needs to handle two different situationsinitial requests for the new_topic page (in which case it should show blank formand the processing of any data submitted in the form it then needs to redirect the user back to the topics pageviews py from django shortcuts import render from django http import httpresponseredirect from django core urlresolvers import reverse from models import topic from forms import topicform --snip-def new_topic(request)"""add new topic "" if request method !'post'no data submittedcreate blank form form topicform(elsepost data submittedprocess data form topicform(request postx if form is_valid() form save( return httpresponseredirect(reverse('learning_logs:topics')context {'form'formreturn render(request'learning_logs/new_topic html'contextwe import the class httpresponseredirectwhich we'll use to redirect the reader back to the topics page after they submit their topic the reverse(function determines the url from named url patternmeaning that django will generate the url when the page is requested we also import the form we just wrotetopicform user accounts