I have some event data that pulls in a link, l `https://molove.com/{custom_link_here}`. Is there a clever way to split this data as I want to add /de to my link in some instances, i.e. `https://molove.com/de/{custom_link_here}.
I tried the following django but it always results in an error. What am I missing here?
1: Replace the Base Url with the one containing de
2: Split the URL and add in de
https://molove.com/de/{{ event.custom_link|default:"https://molove.com/"|replace("https://molove.com", "") }}
{% set base_url, path = event.custom_link|default:"https://molove.com/"|split('/', 1) %}
{{ base_url }}/de/{{ path }}