title: display edit button only if the logged in user is same as the user's page?
body: <p><strong>example:</strong></p>
  
  <p>1.example.com/username1</p>
  
  <p>2.example.com/username2</p>
  
  <p>i want to take to user to the edit profile page, i got all the permission working correctly and set the views accordingly.</p>
  
  <p><strong>My Problem:</strong></p>
  
  <p>i loggedin as username1 so i should not be able to access <code>example.com/username2/edit/</code>. i got this to work in the views by adding some permissions, but i dont want to display the edit button when the loggedin username1 views the page of username2. Now i use <code>{% if user.is_authenticated %}</code> and this results in display the edit button on page of username2 even though the loggedin user is username1.</p>
  
  <p>Any simple solutions that can be used in the templates directly?</p>