My goal is to save the data I receive from the Kivymd interface in the Django model. Actually, there is no problem in saving many types of data, but the e-mail part caused problems.
Below, I have shown the Django models and the operations on the Kivymd side (1. Getting the data from the front; 2. Post processing with DRF).
from django.db import models
class Model(models.Model):
user_mail = Model.EmailField()
And the posting progress
...
def data(self):
email = self.screen.ids.email_id.text
requests.post(url, json('user_mail':'email')
This is in its simplest form, I can give details if you want… And it returns a request 400 error as output:
"POST /users// HTTP/1.1" 400 37
It is worth noting that I received the entered address, but as you can see, an error occurs in the sending part.
Ysmaýyl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1