Fixing wrong routes in core staticdir
This commit is contained in:
		
							parent
							
								
									81ff500200
								
							
						
					
					
						commit
						c2f7f32ddc
					
				@ -1,9 +1,7 @@
 | 
			
		||||
from    bottle      import Bottle, get, static_file
 | 
			
		||||
from    bottle      import Bottle, static_file
 | 
			
		||||
from    config      import directory
 | 
			
		||||
 | 
			
		||||
app = Bottle()
 | 
			
		||||
 | 
			
		||||
for items in directory.static:
 | 
			
		||||
    @app.get(items['route'])
 | 
			
		||||
    def static_items(filepath):
 | 
			
		||||
        return static_file(filepath, root=items['root'])
 | 
			
		||||
for item in directory.static:
 | 
			
		||||
    app.route(item['route'], "GET", lambda filepath, root=item['root']: static_file(filepath, root=root) )
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user