[Answer]-Safely save data to django model using AJAX

1👍

Seems that you have stumbled upon the great security flaw that is Cross-site Scripting attacks. They are several ways you can get around it, but going into all of them in one answer would be fruitless. I suggest you Google the term and do some poking around, and you will find several different methods on how to protect your site better.

Django has a security page dedicated to talking about how to protect your site.

Leave a comment