mirror of
				https://github.com/inventree/inventree-docs.git
				synced 2025-10-31 21:05:38 +00:00 
			
		
		
		
	* Update docs for config.yaml (cherry picked from commit eb7d4bb251f8c59f4dba2ebce67e6a3d27bd233e) * Add more settings (cherry picked from commit 70cf34c7afaef23133d3215e957add6ffa3a4928) * Config docs cleanup * Update docker dev quickstart guide * plugin settings * Document currency support * Add extra information for secret_key * Slight tweaks to docker setup guide
		
			
				
	
	
		
			32 lines
		
	
	
		
			622 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			622 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import os
 | |
| from posixpath import dirname
 | |
| 
 | |
| from urllib import request
 | |
| 
 | |
| 
 | |
| def define_env(env):
 | |
| 
 | |
|     @env.macro
 | |
|     def listimages(subdir):
 | |
|         """
 | |
|         Return a listing of all asset files in the provided subdir
 | |
|         """
 | |
| 
 | |
|         here = os.path.dirname(__file__)
 | |
| 
 | |
|         directory = os.path.join(here, 'docs', 'assets', 'images', subdir)
 | |
| 
 | |
|         assets = []
 | |
| 
 | |
|         allowed = [
 | |
|             '.png',
 | |
|             '.jpg',
 | |
|         ]
 | |
| 
 | |
|         for asset in os.listdir(directory):
 | |
| 
 | |
|             if any([asset.endswith(x) for x in allowed]):
 | |
|                 assets.append(os.path.join(subdir, asset))
 | |
| 
 | |
|         return assets
 |