mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 12:22:47 +00:00 
			
		
		
		
	Load config from 'config.py'.
This commit is contained in:
		@@ -1,7 +1,14 @@
 | 
				
			|||||||
 | 
					from config import config
 | 
				
			||||||
from flask import Flask
 | 
					from flask import Flask
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def create_app():
 | 
					def create_app(config_name):
 | 
				
			||||||
    app = Flask(__name__)
 | 
					    app = Flask(__name__)
 | 
				
			||||||
 | 
					    app.config.from_object(config[config_name])
 | 
				
			||||||
 | 
					    config[config_name].init_app(app)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @app.route('/')
 | 
				
			||||||
 | 
					    def index():
 | 
				
			||||||
 | 
					        return 'Opaque'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return app
 | 
					    return app
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user