Is it possible to use the truncate tag in django templates without getting the ...? -


if value = "manbearpig" , in templates called {{value|truncate:6}} displayed value along lines of manbe....

how can same result without ... in end?

you can use slice filter. works same regular slicing built python.

 {{ value|slice:":6" }} 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -