Is it possible to apply slicing to django function on template?
It should be possible to use {% canonical_url entry as url %} to get the desired URL as the variable url, rather than outputting it directly from the tag. After that, you can perform the slicing on the variable using {{ url|slice:":-1" }}.
I´m trying to make a whatsapp button but I´m having problems with the trailing slash at the end on the href.  Whatsapp renders wrongly with the trailing slash.
I´m using wagtail and puput. I´d like to do it on template only because wagtail and puput are addons on divio. If I install them separatedly, I would have to remake my website, so I can´t change models.py.
I´m using {% canonical_url entry %} for the href. What I´d like to have would be something like {% canonical_url|slice:":-1" entry %}
They provide full_url placeholder, but it doesn´t add date to link. It gives foo.com/slug instead of foo.com/2017/09/01/slug so everything gets rendered wrong too.
Any suggestions? 
Thanks!