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

Тел: +7 965 3737 888

619

Просмотров

2

Ответов

Add HTML Attributes in Model

Maybe there is a better solution, feedback welcome!

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

Ответы (2):

Ответguettli:18.08.2008
Ответ полезен? Да0/Нет0

Reply to humphreymurray: I think it is OK to have this in the model. You can set the default size there. Of course custom models can override this.

And: I don't but HTML in the model. I just pass a dictionary which map do attributes. There are no [HTML_REMOVED]. I use it only for the attribute size and class.

I won't use it for things like "onchange".

Ответhumphreymurray:19.05.2008
Ответ полезен? Да0/Нет0

I wouldn't include html formating in the model. It defeats the purpose of having separator between the model and the form. The form would be a better place for this logic?