Permalink
Browse files

Merge branch 'develop' of github.com:divio/django-cms into feature/ve…

…nv-tests
  • Loading branch information...
ojii committed Jun 8, 2012
2 parents d414082 + 88381f3 commit a4ddb399a57327f96e5aab4e4521480fa1342c81
Showing with 4 additions and 5 deletions.
  1. +2 −2 cms/admin/pageadmin.py
  2. +2 −3 cms/utils/mail.py
View
@@ -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
@@ -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,
})

0 comments on commit a4ddb39

Please sign in to comment.