title: Django : customizing FileField value while editing a model
body: <p>I've got a model, with <code>FileField</code>. When I edit this model in a view, I want to change the "current" value of <code>FileField</code> which gets displayed in the view form. Let me explain.</p>
  
  <p><strong>models.py:</strong></p>
  
  <pre><code>class DemoVar_model(models.Model):
      ...
      Welcome_sound=models.FileField(upload_to='files/%Y/%m/%d')
  </code></pre>
  
  <p><strong>forms.py:</strong></p>
  
  <pre><code>class DemoVar_addform(ModelForm):
      ...
      class Meta:
          model = DemoVar_model        
  </code></pre>
  
  <p><strong>views.py:</strong></p>
  
  <pre><code>soundform = DemoVar_addform(instance=ivrobj)
  ....
  return render_to_response(template,{'soundform':soundform}, ....)
  </code></pre>
  
  <p>Now I want to edit this model in my view. When I look in browser, I see the form being displayed as </p>
  
  <pre><code>Welcome sound: Currently: welcome_files/2011/04/27/15_35_58_ojCompany.wav.mp3 
  Change : &lt;Choose File button&gt;
  </code></pre>
  
  <p>I want to change this "Currently" value, which describes the whole path of the file as it exits on my server. I want to trim this string to just the filename without the path. How do I accomplish that?</p>