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

Тел: +7 965 3737 888

427

Просмотров

0

Ответов

improved getattr template filter

I tried to use Joshua's nice and very useful getattr template filter (#38), but ran into a few problems.

I used it on objects outside of my control (admin internals, coughcough) and on some of them the code didn't catch the resulting exceptions. So I improved the error handling a bit.

Furthermore, the code now also returns the value of a callable instead of the callable itself (last 4 lines).

Looking at my code though, it can certainly be improved further.

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