title: Display django class based views data depending on user permissions?
body: <p>I have data that can be viewed in multiple ways.  The different ways depend on whether the user is logged in/anonymous, and if the user is logged in, it depends on whether the user is the author/reader of the post.</p>
  
  <p>I have been looking through django class based views and django braces and I haven't found an established answer to dealing with this.  I'm assuming this sort of decision making will result in a tree structure and so far, the code I've seen directs the user to a url depending on the user's permissions, it doesn't display different types of data depending on the user's permissions/login status.</p>
  
  <p>What's the best approach to dealing with this? Or is there code that I've missed or haven't seen that handles this?</p>
  
  <p>Note: I'd like to use django class based views.</p>
  
  <p>For example:</p>
  
  <p>I visit a stackoverflow post.</p>
  
  <p>Display post and comments.</p>
  
  <p>If anonymous user, display join stackoverflow data elements.</p>
  
  <p>If logged in user, check if author or not author.</p>
  
  <p>If author, display edit post data elements.</p>
  
  <p>If not author, do not display edit post data elements.</p>
  
  <p>How do I represent the above conditional statements in a django CBV correctly?</p>