How can I access initial arguments within Django dash?

I have searched a lot but still there is no information on how to access initial arguments.
It seems I was able to send intial_arguments at /django_plotly_dash/app/SimpleExample/initial/dpd-initial-args-f51525f2777a46f4ae276c8c83af4a52/

but I can’t access it within django app. Pls suggest.

You can store the dash application state and use it like any other Django model - see the docs for details on the models themselves.

You can have many instances of state for the same dash app, with the app’s slug being used as a unique identifier in both the database and the template invocation.

Thanks @delsim for the response. Still, I am finding it difficult to use the suggested functions. Can you pls point me to any specific examples where initial_arguments are being used.

There is an online demo whose source code is in the project’s github repo that shows how the arguments are set.

If you run the demo, this will create a DashApp instance and store it in the database; you can now access this like any other Django object. State is stored as a json blob in the base_state member variable and save_on_change can be used to update the stored object every time the state changes.

1 Like