mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-10-30 23:03:02 +00:00 
			
		
		
		
	Fix import pycountry on python 3.12 without warning
Fix shadowed "babel" name
This commit is contained in:
		| @@ -34,7 +34,7 @@ from .cli import CliParameter | ||||
| from .reverseproxy import ReverseProxied | ||||
| from .server import WebServer | ||||
| from .dep_check import dependency_check | ||||
| from .babel import babel, get_locale | ||||
| # from .babel import babel, get_locale | ||||
| from .updater import Updater | ||||
| from . import config_sql | ||||
| from . import cache_buster | ||||
| @@ -182,6 +182,7 @@ def create_app(): | ||||
|     app.secret_key = os.getenv('SECRET_KEY', config_sql.get_flask_session_key(ub.session)) | ||||
|  | ||||
|     web_server.init_app(app, config) | ||||
|     from .cw_babel import babel, get_locale | ||||
|     if hasattr(babel, "localeselector"): | ||||
|         babel.init_app(app) | ||||
|         babel.localeselector(get_locale) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ozzie Isaacs
					Ozzie Isaacs