title: Django filter tag not working: AttributeError at / 'str' object has no attribute 'filter_function
body: <p>According to the Document model below, the 'document.upload.name' in the template will display like "user_NAME/smile.jpg". <br>
  I want to split the "user_NAME/smile.jpg" by '/'. So in the template, it will only display "smile.jpg". <br>
  I use the 'value.split' in the filter of 'upload_extras'. but the error was: 'str' object has no attribute 'filter_function'.</p>
  
  <p>this is the template:</p>
  
  <pre><code>&lt;td&gt;&lt;a href="{{ document.upload.url }}" target="_blank"&gt;{{ 
  document.upload.name|filename_extract }}&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>this is my function in upload_extras.py</p>
  
  <pre><code>#upload_extras.py
  from Django import template 
  register =template.Library
  
  @register.filter('filename_extract')
  def filename_extract(value):
    '''extract the file name from the upload_to_path'''
         folder, filename = value.split('/')
         return filename
  </code></pre>
  
  <p>And the last is the model:</p>
  
  <pre><code> # Create your models here.
   def upload_to_path(instance, filename):
       return 'user_{0}/{1}'.format(instance.user.username, filename)
  
  class Document(models.Model):
       uploaded_at = models.DateTimeField(auto_now_add=True)
       upload = models.FileField(upload_to=upload_to_path)
       user = models.ForeignKey(User, on_delete=models.CASCADE)
  </code></pre>