The confusing part is how to insert a scrollable text field into a CNC form that is not editable.
: . .
-... , :
context = {}
with open('/terms-and-conditions.txt') as f:
context['terms'] = f.read()
:
class MyForm(forms.Form):
i_agree = forms.BooleanField()
...
<div style="width:600px; height:300px; overflow-y:scroll;">
{% if form.errors %}
<h1>You must agree to the TNC</h1>
{% endif %}
<form method="post">
{{ form.as_p }}
<input type="submit" value="I agree to the TNC" />
</form>
</div>
- . , readonly textarea, javascript ..