summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-07-17 17:44:57 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-07-17 17:44:57 +0000
commit35e81ce5af17268773e5f4fc48bc8452c89cc552 (patch)
tree1a9ae6cb23711c343e7752c670531ff589c37be2
parent58df4ce6364643732c6b2d9ab2d4a0254f5e1a89 (diff)
Changed models.auth.LogEntry.get_admin_url NOT to be hard-coded with an initial slash
git-svn-id: http://code.djangoproject.com/svn/django/trunk@158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/models/auth.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/django/models/auth.py b/django/models/auth.py
index 7f1a32f2a7..121704d9e7 100644
--- a/django/models/auth.py
+++ b/django/models/auth.py
@@ -282,8 +282,11 @@ class LogEntry(meta.Model):
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)