Value={{ строка }} выдает только 1 слово из строки
{% for q, con in questions_dict.items %}
<form action="{% url 'psycho:modify_question' %}", method="post">
{% csrf_token %}
<input type="hidden" name="oldtext" value={{ q }}>
<input type="text" placeholder="Text of your question" name="text" value={{ q }}
даже если q равно "Граф Монте-Кристо" полная книга, на странице отображается только первое слово. Если я делаю
{% for q, con in questions_dict.items %}
<form action="{% url 'psycho:modify_question' %}", method="post">
{% csrf_token %}
{{ q }}
<input type="hidden" name="oldtext" value={{ q }}>
<input type="text" placeholder="Text of your question" name="text" value={{ q }}
Я вижу полную строку. Как это исправить?
Как указал в комментариях умный парень Nilost, цитирование значения (в моем случае <input type="hidden" name="oldtext" value="{{ q }}">
) устраняет проблему.