我想使用django-filetransfer在管理员中上传文件,到目前为止,我已经覆盖了admin.ModelAdmin中的render_change_form方法。我错过了什么?
def render_change_form(self, request, context, add=False, change=False, form_url='', obj=None):
upload_url,upload_data = prepare_upload(request, request.path)
context['upload_url'] = upload_url
context['upload_data'] = upload_data
return admin.ModelAdmin.render_change_form(self, request, context,
add=add, change=change, form_url=upload_url, obj=obj)