Django custom tags in textfield -
I do not know that this is the right question for me, but I could not think of telling anyone else to give me some custom tags For example, if I want to write "Article Writer: Which I am" as an input I would like to present this text as it is, but with the difference, when I'll click on it, then I'll direct it for example The wish to have .com / Jo am- I. So if I (srch: some) this example should be on example.com/something how can I do it? Thank you.
@ register.filter @stringfilter def bkz (value, autoescape = none): Value = Re.sub (r '(. *) \ (Bkz: (. *) \ B \)', r '\ 1 (bkz: & lt; a href = "/ baslik /" & gt; \ 2 ; / A & gt;), value) return mark_safe (value) bkz.is_safe = true bkz.needs_autoescape = true
This templatetag worked fine for me.
Comments
Post a Comment