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
Post a Comment