Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed three more ``admin.site.root_path`` instances. Refs #1214 #1216

  • Loading branch information...
commit 88381f32e1b3dc0e563dc7a171178287451fc3d7 1 parent a8efd79
@piquadrat piquadrat authored
Showing with 4 additions and 5 deletions.
  1. +2 −2 cms/admin/pageadmin.py
  2. +2 −3 cms/utils/mail.py
View
4 cms/admin/pageadmin.py
@@ -674,7 +674,7 @@ def changelist_view(self, request, extra_context=None):
'cl': cl,
'opts':opts,
'has_add_permission': self.has_add_permission(request),
- 'root_path': self.admin_site.root_path,
+ 'root_path': reverse('admin:index'),
'app_label': app_label,
'CMS_MEDIA_URL': settings.CMS_MEDIA_URL,
'softroot': settings.CMS_SOFTROOT,
@@ -994,7 +994,7 @@ def delete_translation(self, request, object_id, extra_context=None):
"deleted_objects": deleted_objects,
"perms_lacking": perms_needed,
"opts": titleopts,
- "root_path": self.admin_site.root_path,
+ "root_path": reverse('admin:index'),
"app_label": app_label,
}
context.update(extra_context or {})
View
5 cms/utils/mail.py
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
from django.core.mail import EmailMultiAlternatives
+from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
-
-from django.contrib import admin
from django.contrib.sites.models import Site
from cms.utils.urlutils import urljoin
@@ -16,7 +15,7 @@ def send_mail(subject, txt_template, to, context=None, html_template=None, fail_
context = context or {}
context.update({
- 'login_url': "http://%s" % urljoin(site.domain, admin.site.root_path),
+ 'login_url': "http://%s" % urljoin(site.domain, reverse('admin:index')),
'title': subject,
})
Please sign in to comment.
Something went wrong with that request. Please try again.