def get_context_object_name(self, obj): """ Get the name to use for the object. """ try: return SingleObjectMixin.get_context_object_name(self, obj) except AttributeError: return "object"