1
0
mirror of https://github.com/django/django.git synced 2025-06-05 03:29:12 +00:00

magic-removal: Fixed #1308 -- API changes in admin models. Thanks, mookai

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-02-02 03:19:12 +00:00
parent 52b2dd620f
commit a9db2c18c0

View File

@ -41,11 +41,11 @@ class LogEntry(models.Model):
def get_edited_object(self): def get_edited_object(self):
"Returns the edited object represented by this log entry" "Returns the edited object represented by this log entry"
return self.get_content_type().get_object_for_this_type(pk=self.object_id) return self.content_type.get_object_for_this_type(pk=self.object_id)
def get_admin_url(self): def get_admin_url(self):
""" """
Returns the admin URL to edit the object represented by this log entry. Returns the admin URL to edit the object represented by this log entry.
This is relative to the Django admin index page. This is relative to the Django admin index page.
""" """
return "%s/%s/%s/" % (self.get_content_type().get_package(), self.get_content_type().python_module_name, self.object_id) return "%s/%s/%s/" % (self.content_type.get_package(), self.content_type.python_module_name, self.object_id)