title: How to check if the object has property in view in Django?
body: <p>I am trying to get the documents property in a general function, but a few models may not have the documents attribute. Is there any way to first check if a model has the documents property, and then conditionally run code?</p>
  <pre><code>if self.model has property documents:
      context['documents'] = self.get_object().documents.()
  </code></pre>