You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following fields are currently incompatible with django_form due to ReactPy's client and server not supporting file serialization:
FileField
ImageField
Resolving this will require implementing some sort of messaging schema that can differentiate between layout messages and file transfers. On the server-side, we could consider re-using Django's UploadHandler. The UploadHandler will probably need to be subclassed to get things working with ReactPy.
It might be difficult to figure out what to do on early websocket termination. It might also make sense to create a messaging schema where the server can control the incoming upload speed.
The following fields are currently incompatible with django_form, and this seems to be caused by weirdness with how Django re-hydrates/re-renders the form submission data:
SplitDateTimeField
MultiValueField
When the form data is submitted, those fields don't properly rehydrate themselves when given form submission data. This causes incorrect re-renders.
Fixing this will require digging into Django's form rendering stack and figuring out why they don't rehydrate properly when given the expected values.
The following limitation will need to be resolved:
Implement form restoration on page reload.
Perhaps pre-rendering plus the browser's default behavior may already handle form restoration well enough? Probably not, but this should be investigated.
Maybe this involves creating a new setting called form_restoration_method that can be set to "URL", "CLIENT_LOCAL_STORAGE", "SERVER_SESSION", or None. Note that "URL" mode would likely limit the user to one form per page.
Maybe we need to mandate the user provides a key for the form if using form restoration in order to properly re-hydrate the form? Or perhaps we can use the form's CSRF token as the key? Or perhaps it can be linked directly to the browser's scope["session"]? This needs some additional thought.
The text was updated successfully, but these errors were encountered:
Current Situation and Proposed Actions
The following fields are currently incompatible with
django_form
due to ReactPy's client and server not supporting file serialization:FileField
ImageField
Resolving this will require implementing some sort of messaging schema that can differentiate between layout messages and file transfers. On the server-side, we could consider re-using Django's UploadHandler. The UploadHandler will probably need to be subclassed to get things working with ReactPy.
It might be difficult to figure out what to do on early websocket termination. It might also make sense to create a messaging schema where the server can control the incoming upload speed.
The following fields are currently incompatible with
django_form
, and this seems to be caused by weirdness with how Django re-hydrates/re-renders the form submission data:SplitDateTimeField
MultiValueField
When the form data is submitted, those fields don't properly rehydrate themselves when given form submission data. This causes incorrect re-renders.
Fixing this will require digging into Django's form rendering stack and figuring out why they don't rehydrate properly when given the expected values.
The following limitation will need to be resolved:
form_restoration_method
that can be set to"URL"
,"CLIENT_LOCAL_STORAGE"
,"SERVER_SESSION"
, orNone
. Note that "URL" mode would likely limit the user to one form per page.key
for the form if using form restoration in order to properly re-hydrate the form? Or perhaps we can use the form's CSRF token as the key? Or perhaps it can be linked directly to the browser'sscope["session"]
? This needs some additional thought.The text was updated successfully, but these errors were encountered: