Upgrade back-office icon view
authorThierry Florac <thierry.florac@onf.fr>
Thu, 21 Apr 2016 17:18:11 +0200
changeset 124 601c667286f6
parent 123 1229755abe03
child 125 d294083fb28c
Upgrade back-office icon view
src/pyams_skin/configuration.py
--- a/src/pyams_skin/configuration.py	Thu Apr 21 17:17:32 2016 +0200
+++ b/src/pyams_skin/configuration.py	Thu Apr 21 17:18:11 2016 +0200
@@ -17,8 +17,8 @@
 import pkg_resources
 
 # import interfaces
-from pyams_skin.interfaces.configuration import IStaticConfiguration, IConfiguration, \
-    SKIN_CONFIGURATION_KEY, IBackOfficeConfiguration, SKIN_BACK_CONFIGURATION_KEY
+from pyams_skin.interfaces.configuration import IStaticConfiguration, IConfiguration, SKIN_CONFIGURATION_KEY, \
+    IBackOfficeConfiguration, SKIN_BACK_CONFIGURATION_KEY
 from pyams_utils.interfaces.site import IStaticConfigurationManager, IConfigurationManager, IConfigurationFactory, \
     IBackOfficeConfigurationFactory
 from pyams_utils.interfaces.tales import ITALESExtension
@@ -28,7 +28,7 @@
 # import packages
 from persistent import Persistent
 from pyams_file.property import FileProperty
-from pyams_file.views.file import MediaFileView
+from pyams_file.views.file import FileView
 from pyams_utils.adapter import ContextRequestViewAdapter, ContextAdapter, adapter_config
 from pyams_utils.request import check_request
 from pyams_utils.traversing import get_parent
@@ -149,7 +149,7 @@
     if configuration.icon is not None:
         request = request.copy()
         request.context = configuration.icon
-        return MediaFileView(request)
+        return FileView(request)
     return HTTPNotFound()
 
 
@@ -210,5 +210,5 @@
     if configuration.icon is not None:
         request = request.copy()
         request.context = configuration.icon
-        return MediaFileView(request)
+        return FileView(request)
     return HTTPNotFound()