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:
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.
There was a related draft PR for file uploads that could be leveraged for inspiration.
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:
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:
Current Situation and Proposed Actions
The following fields are currently incompatible with
django_formdue to ReactPy's client and server not supporting file serialization:FileFieldImageFieldResolving 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.
There was a related draft PR for file uploads that could be leveraged for inspiration.
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:SplitDateTimeFieldMultiValueFieldWhen 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_methodthat 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.keyfor 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.