If I defined a form field to be readonly using code like this:
somefield = models.CharField(
widget=forms.TextInput(attrs={'readonly':'readonly'})
)
how do I access the ‘readonly’ attribute in the Django template for the field, assuming I iterate over the fields in the form, like this:
{% for field in form %}
{% if field ..... %}
{% endif %}
{% endfor %}
Thank you.