I have this problem I’ve been trying to tackle for a while. I have a variable that is 17 characters long, and when displaying the variable on my form, I want it to display the last seven characters of this variable in bold…how do I go about this…I’d really appreciate anybody’s insight on this.
Share
The
slicebuilt-in filter in Django templates acts like slicing does in Python, so that for examples[:-7]is the string excluding its last 7 characters ands[-7:]is the substring formed by just the last 7 characters.