Get site root from request
authorThierry Florac <thierry.florac@onf.fr>
Wed, 15 Jun 2016 12:41:52 +0200
changeset 68 6302ba59d8ea
parent 67 a6e6f1bc9e22
child 69 5026082a5aa1
Get site root from request
src/pyams_security/zmi/profile.py
--- a/src/pyams_security/zmi/profile.py	Thu Jun 02 16:20:53 2016 +0200
+++ b/src/pyams_security/zmi/profile.py	Wed Jun 15 12:41:52 2016 +0200
@@ -20,7 +20,6 @@
 from pyams_security.interfaces.profile import IPublicProfile
 from pyams_skin.interfaces.viewlet import IUserMenusViewletManager
 from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces.site import ISiteRoot
 
 # import packages
 from pyams_form.form import AJAXEditForm
@@ -28,7 +27,6 @@
 from pyams_skin.viewlet.menu import MenuItem, MenuDivider
 from pyams_template.template import template_config
 from pyams_utils.adapter import adapter_config
-from pyams_utils.traversing import get_parent
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogEditForm, InnerAdminEditForm
 from pyramid.view import view_config
@@ -71,7 +69,7 @@
         return self.request.principal.title
 
     def getContent(self):
-        return get_parent(self.context, ISiteRoot)
+        return self.request.root
 
 
 @view_config(name='user-profile.json', request_type=IPyAMSLayer, renderer='json', xhr=True)