title: Calling Python function in Django template
body: <p>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:</p>
  
  <pre><code>{{ newsletter.NewsletterPath.split('/').-1 }}
  </code></pre>
  
  <p>Unfortunately, it doesn't like the split. Some might suggest that I do the split in the view, but I'm not sure how to do that because I need to do it for all of the records. It would be much easier if I could do it in the template. Is there a way to do this?</p>