Задать вопрос

Тел: +7 965 3737 888

489

Просмотров

0

Ответов

Template Filter attr

<p>You can add this code to a file named "field_attrs.py" in a templatetags folder inside an application.</p>
<p>To use it, remember to load the file with the following template tag:</p>
{% load field_attrs %}

<p>And for each field you want to change the widget's attr:</p>
{{ form.phone|attr:"style=width:143px;background-color:yellow"|attr:"size=30" }}

Вопрос полезен? Да0/Нет0
file_3600.py(204.0б)
None