@@ -356,18 +356,11 @@ def __init__(
356
356
"assets_folder" ,
357
357
"assets_url_path" ,
358
358
"eager_loading" ,
359
- "url_base_pathname" ,
360
- "routes_pathname_prefix" ,
361
- "requests_pathname_prefix" ,
362
359
"serve_locally" ,
363
360
"compress" ,
364
361
],
365
362
"Read-only: can only be set in the Dash constructor" ,
366
363
)
367
- self .config .finalize (
368
- "Invalid config key. Some settings are only available "
369
- "via the Dash constructor"
370
- )
371
364
372
365
# keep title as a class property for backwards compatibility
373
366
self .title = title
@@ -427,8 +420,23 @@ def __init__(
427
420
428
421
self .logger .setLevel (logging .INFO )
429
422
430
- def init_app (self , app = None ):
423
+ def init_app (self , app = None , ** kwargs ):
431
424
"""Initialize the parts of Dash that require a flask app."""
425
+
426
+ self .config .update (kwargs )
427
+ self .config .set_read_only (
428
+ [
429
+ "url_base_pathname" ,
430
+ "routes_pathname_prefix" ,
431
+ "requests_pathname_prefix" ,
432
+ ],
433
+ "Read-only: can only be set in the Dash constructor or during init_app()" ,
434
+ )
435
+
436
+ self .config .finalize (
437
+ "Invalid config key. Some settings are only available "
438
+ "via the Dash constructor"
439
+ )
432
440
config = self .config
433
441
434
442
if app is not None :
@@ -438,6 +446,7 @@ def init_app(self, app=None):
438
446
config .routes_pathname_prefix .replace ("/" , "_" ), "dash_assets"
439
447
)
440
448
449
+ print (assets_blueprint_name )
441
450
self .server .register_blueprint (
442
451
flask .Blueprint (
443
452
assets_blueprint_name ,
0 commit comments