if request.user == user: #If we are trying to view our own nonexistent profile, redirect to profile creation
raise Http404 #Otherwise 404
if public_profile_field is not None and \
not getattr(profile_obj, public_profile_field):
- if user == request.user: #If the user is trying to view their own (invisible) profile
- return HttpResponseRedirect(reverse('profiles_edit_profile')) #Let them edit.
- else: #Otherwise return no profile object.
+ if user != request.user: #If the user is not trying to view their own (invisible) profile
if extra_context is None: