I have a Django model:
class MyModel(models.Model):
charField = models.CharField(maxLength=200)
textField = models.TextField()
and an HTML template with a JS function that displays charField and textField like this:
document.getElementById("someElement").innerHTML = "{{ myObject.charField }}";
document.getElementById("someOtherElement").innerHTML = "{{ myObject.textField }}";
The former works fine, but the latter doesn't. I assume the problem is the fact that it is a TextField because there is no other difference between the two. How can I fix this?