[Django]-Insert into database MySQL Django

3👍

Try this:

 cc_chat_data_obj = CcChatData.objects.create(conversation_id = conversation_id , reply_from = request.user.id , b_id = b_id, q_id = q_id)
 web_reply_obj = WebReply.objects.create(query_id = q_id, conversation_id = conversation_id , b_id = b_id, u_query = reply , date_time = date_time.strftime("%Y-%m-%d %H:%M:%S"),diff = 0)

0👍

Did you check if your form is indeed valid? (is_valid)

Your current code does nothing when the form isn’t valid.

👤eugene

Leave a comment