| 
				
			 | 
			
			
				@@ -1,6 +1,7 @@ 
			 | 
		
	
		
			
			| 
				1
			 | 
			
				1
			 | 
			
			
				 from paste.deploy.converters import asbool 
			 | 
		
	
		
			
			| 
				2
			 | 
			
				2
			 | 
			
			
				 from urllib.parse import urlparse 
			 | 
		
	
		
			
			| 
				3
			 | 
			
				3
			 | 
			
			
				 from tracim.logger import logger 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4
			 | 
			
			
				+from depot.manager import DepotManager 
			 | 
		
	
		
			
			| 
				4
			 | 
			
				5
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				5
			 | 
			
				6
			 | 
			
			
				 from pyramid.request import Request 
			 | 
		
	
		
			
			| 
				6
			 | 
			
				7
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -8,7 +9,9 @@ from pyramid.request import Request 
			 | 
		
	
		
			
			| 
				8
			 | 
			
				9
			 | 
			
			
				 class RequestWithCFG(Request): 
			 | 
		
	
		
			
			| 
				9
			 | 
			
				10
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				10
			 | 
			
				11
			 | 
			
			
				     def config(self): 
			 | 
		
	
		
			
			| 
				11
			 | 
			
				
			 | 
			
			
				-        return CFG(self.registry.settings) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				12
			 | 
			
			
				+        cfg = CFG(self.registry.settings) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				13
			 | 
			
			
				+        cfg.configure_filedepot() 
			 | 
		
	
		
			
			| 
				
			 | 
			
				14
			 | 
			
			
				+        return cfg 
			 | 
		
	
		
			
			| 
				12
			 | 
			
				15
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				13
			 | 
			
				16
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				14
			 | 
			
				17
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -416,6 +419,15 @@ class CFG(object): 
			 | 
		
	
		
			
			| 
				416
			 | 
			
				419
			 | 
			
			
				         #     self.RADICALE_CLIENT_BASE_URL_PREFIX, 
			 | 
		
	
		
			
			| 
				417
			 | 
			
				420
			 | 
			
			
				         # ) 
			 | 
		
	
		
			
			| 
				418
			 | 
			
				421
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				422
			 | 
			
			
				+    def configure_filedepot(self): 
			 | 
		
	
		
			
			| 
				
			 | 
			
				423
			 | 
			
			
				+        depot_storage_name = self.DEPOT_STORAGE_NAME 
			 | 
		
	
		
			
			| 
				
			 | 
			
				424
			 | 
			
			
				+        depot_storage_path = self.DEPOT_STORAGE_DIR 
			 | 
		
	
		
			
			| 
				
			 | 
			
				425
			 | 
			
			
				+        depot_storage_settings = {'depot.storage_path': depot_storage_path} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				426
			 | 
			
			
				+        DepotManager.configure( 
			 | 
		
	
		
			
			| 
				
			 | 
			
				427
			 | 
			
			
				+            depot_storage_name, 
			 | 
		
	
		
			
			| 
				
			 | 
			
				428
			 | 
			
			
				+            depot_storage_settings, 
			 | 
		
	
		
			
			| 
				
			 | 
			
				429
			 | 
			
			
				+        ) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				430
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				419
			 | 
			
				431
			 | 
			
			
				     class CST(object): 
			 | 
		
	
		
			
			| 
				420
			 | 
			
				432
			 | 
			
			
				         ASYNC = 'ASYNC' 
			 | 
		
	
		
			
			| 
				421
			 | 
			
				433
			 | 
			
			
				         SYNC = 'SYNC' 
			 |