How can I use code to insert records into a custom form table #295
-
I have a need to insert records into the table for a custom fobi form. I tried using a requests.put() and that came close, I was able to put data but only if I grabbed the csrf tokens from the terminal and inserted them in the header in the put to my custom form using the DRF. Or is it better to modify the CsrfViewMiddleware to exempt csrf checking on my requests.put() to the custom fobi form? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think in this case REST API is indeed your best option. It's strange though that you have to use CRF tokens. Django REST Framework doesn't require that normally. |
Beta Was this translation helpful? Give feedback.
I think in this case REST API is indeed your best option. It's strange though that you have to use CRF tokens. Django REST Framework doesn't require that normally.