-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: make panel state persist to database #1401
Comments
I've started on this and immediately ran into the reason why it doesn't exist. The difficulty is the serialization and deserialization of the toolbar. Since it's all done in memory today, there is none. This might require a bit of refactoring to the application so that the base toolbar and panels have its data in a format that can be serialized. |
To get the toolbar to store its state in a persistent manner is likely a large refactor of the application. It may be faster @brettdh for you to create another library that extends the toolbar to export the data or rendered templates on each request. |
@tim-schilling do you know of any other such libraries that extend the toolbar in any way? Not sure where I'd get started without poking into its internals. |
I don't know of other third party applications that do something similar. Unfortunately, the toolbar doesn't have any signals to hook into that would make this a bit easier to manage. If you want to avoid that, then I think subclassing DebugToolbar and overriding |
This may be required to support async / channels (#1413). The rational is that channels (ASGI) uses multiple processes when using |
As described in #1252, panels can sometimes come back with this error:
This is made more likely by stateless execution environments such as AWS Lambda - if the request that generates the state is handled by a different lambda than the request that fetches the state (which can happen frequently), this error will appear.
We can improve matters by storing panel state in the database and looking it up when the panel JS requests it.
The text was updated successfully, but these errors were encountered: