Browse files

Changed models.auth.LogEntry.get_admin_url NOT to be hard-coded with …

…an initial slash

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
adrianholovaty committed Jul 17, 2005
1 parent 58df4ce commit 35e81ce5af17268773e5f4fc48bc8452c89cc552
Showing with 5 additions and 2 deletions.
  1. +5 −2 django/models/
@@ -282,8 +282,11 @@ def get_edited_object(self):
return self.get_content_type().get_object_for_this_type(id__exact=self.object_id)
def get_admin_url(self):
- "Returns the admin URL to edit the object represented by this log entry"
- return "/%s/%s/%s/" % (self.get_content_type().package, self.get_content_type().python_module_name, self.object_id)
+ """
+ Returns the admin URL to edit the object represented by this log entry.
+ This is relative to the Django admin index page.
+ """
+ return "%s/%s/%s/" % (self.get_content_type().package, self.get_content_type().python_module_name, self.object_id)
def _module_log_action(user_id, content_type_id, object_id, object_repr, action_flag, change_message=''):
e = LogEntry(None, None, user_id, content_type_id, object_id, object_repr[:200], action_flag, change_message)

0 comments on commit 35e81ce

Please sign in to comment.