Hi. I’m new here in Django and currently working out with the registration forms and APIs.
My target is to create a URL that has a default registration form (Tag ID, Name, and Department with text input each parameter) and a POST request method (the response will be getting from JSON response that will be thrown), and once I POSTed a JSON Response, it will display the Tag ID in the Registration forms and ready to be input other parameters which will be saved in the database once the user clicked the button.
However, I cannot execute the way I want. When I posted a json response, the Tag ID remains no value.
See my code below.
Thank you for helping in advance.
First, a side note: Please do not post images of code, templates, or error messages here. Copy/paste the text into the body of your post. (You can correct your original post or you can post the code into your next response.)
When posting code, templates, or error messages here, enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then the code, then another line of ```. This forces the forum software to keep your code properly formatted.
We’ll need to see the code that is submitting the data.
It would also be helpful if you posted a sample of what’s being submitted. Show what’s being sent as displayed in the network tab of your browser’s developer tools and/or add a print call to print
request.body in your view.