How to prevent user changing URL  to see other submission data Django
Just check that the object retrieved by the primary key belongs to the requesting user. In the view this would be 
if some_object.user == request.user:
    ...

This requires that the model representing the object has a reference to the User model.
I'm new to the web development world, to Django, and to applications that require securing the URL from users that change the foo/bar/pk to access other user data.
Is there a way to prevent this? Or is there a built-in way to prevent this from happening in Django?
E.g.:
foo/bar/22 can be changed to foo/bar/14 and exposes past users data.
I have read the answers to several questions about this topic and I have had little luck in an answer that can clearly and coherently explain this and the approach to prevent this. I don't know a ton about this so I don't know how to word this question to investigate it properly. Please explain this to me like I'm 5.