Inside a django template I\'m trying to call the split function on one of the template variables and then get the last element, so I did something like this:
{{
Templates are deliberately not able to do such stuff. The purpose is to prevent you from putting your business logic in templates, which are meant to deal only with the layout.
So a possible way to do this is to define a NewsletterPathLastElement(self) function in your newsletter Model, and call that from the template.