如何在管理员中Django-non / Djangoappengine / django-filetransfers文件上传?

时间:2011-08-01 20:57:17

标签: django google-app-engine django-nonrel djangoappengine

我想使用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)

0 个答案:

没有答案