the entrieseven though you're logged in as different user we'll fix this now by performing check before retrieving the requested entries in the topic(view functionviews py from django shortcuts import render from django http import httpresponseredirecthttp from django core urlresolvers import reverse --snip-@login_required def topic(requesttopic_id)"""show single topic and all its entries ""topic topic objects get(id=topic_idmake sure the topic belongs to the current user if topic owner !request userraise http entries topic entry_set order_by('-date_added'context {'topic'topic'entries'entriesreturn render(request'learning_logs/topic html'context--snip- response is standard error response that' returned when requested resource doesn' exist on server here we import the http exception uwhich we'll raise if the user requests topic they shouldn' see after receiving topic requestwe make sure the topic' user matches the currently logged-in user before rendering the page if the current user doesn' own the requested topicwe raise the http exception vand django returns error page now if you try to view another user' topic entriesyou'll see page not found message from django in we'll configure the project so users will see proper error page protecting the edit_entry page the edit_entry pages have urls in the form entry_id/where the entry_id is number let' protect this page so no one can use the url to gain access to someone else' entriesviews py --snip-@login_required def edit_entry(requestentry_id)"""edit an existing entry ""entry entry objects get(id=entry_idtopic entry topic if topic owner !request userraise http