Django : customizing FileField value while editing a model
问题 I've got a model, with FileField . When I edit this model in a view, I want to change the "current" value of FileField which gets displayed in the view form. Let me explain. models.py: class DemoVar_model(models.Model): ... Welcome_sound=models.FileField(upload_to='files/%Y/%m/%d') forms.py: class DemoVar_addform(ModelForm): ... class Meta: model = DemoVar_model views.py: soundform = DemoVar_addform(instance=ivrobj) .... return render_to_response(template,{'soundform':soundform}, ....) Now I