initial requestpre-fill form with the current entry --snip-we retrieve the entry and the topic associated with this entry we then check if the owner of the topic matches the currently logged-in userif they don' matchwe raise an http exception associating new topics with the current user currentlyour page for adding new topics is brokenbecause it doesn' associate new topics with any particular user if you try adding new topicyou'll see the error message integrityerror along with learning_logs_topic user_id may not be null django' saying you can' create new topic without specifying value for the topic' owner field there' straightforward fix for this problembecause we have access to the current user through the request object add the following codewhich associates the new topic with the current userviews py --snip-@login_required 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 postif form is_valid() new_topic form save(commit=falsev new_topic owner request user new_topic save(return httpresponseredirect(reverse('learning_logs:topics')context {'form'formreturn render(request'learning_logs/new_topic html'context--snip-when we first call form save()we pass the commit=false argument because we need to modify the new topic before saving it to the database we then set the new topic' owner attribute to the current user finallywe call save(on the topic instance just defined now the topic has all the required data and will save successfully you should be able to add as many new topics as you want for as many different users as you want each user will have access only to their own datawhether they're viewing dataentering new dataor modifying old data user accounts