Today, when you save the content of the Rich Text editor , an AJAX request is sent:
$.ajax ({ type:"POST", URL:"{% url ' cms:add '%}", "title=" + title + "& Content= "+ content +" &keys= "+ keys + " &category= "+ category +" &csrfmiddlewaretoken= "+ $.cookie (' CSRF Token '), dataType:"text", success:function(response) { Confirm.show (' Message ', response); });
At this point, data is lost when the backend uses Django to receive data, and content only gets part of the editor's content. The reason is that the data is sent in a way that should not be appended to the URL. Should be written in the following way:
$.ajax ({ type:"POST", URL:"{% url ' cms:add '%}", data:{ "title": Title, "content": Content, "Keys": Keys, "category": Category, "Csrfmiddlewaretoken": $.cookie (' Csrftoken ') }, DataType:"text", success: function(response) { confirm.show (' Message ', response); }});
It seems that he is still too young, this simple problem is not aware of, engaged for an hour.
Questions about the data sent by Ajax