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?
if self.model has property documents:
context['documents'] = self.get_object().documents.()