Ticket #4189: models.py.diff
File models.py.diff, 1.1 KB (added by , 18 years ago) |
---|
-
django/contrib/comments/models.py
106 106 return "%s: %s..." % (self.user.username, self.comment[:100]) 107 107 108 108 def get_absolute_url(self): 109 return self.get_content_object().get_absolute_url() + "#c" + str(self.id) 109 try: 110 return self.get_content_object().get_absolute_url() + "#c" + str(self.id) 111 except AttributeError: 112 return "" 110 113 111 114 def get_crossdomain_url(self): 112 115 return "/r/%d/%d/" % (self.content_type_id, self.object_id) … … 191 194 return "%s: %s..." % (self.person_name, self.comment[:100]) 192 195 193 196 def get_absolute_url(self): 194 return self.get_content_object().get_absolute_url() + "#c" + str(self.id) 197 try: 198 return self.get_content_object().get_absolute_url() + "#c" + str(self.id) 199 except AttributeError: 200 return "" 195 201 196 202 def get_content_object(self): 197 203 """