Django:如何访问从其他功能上传的文件?

时间:2018-03-26 07:53:34

标签: python django django-forms django-views

我是Django和Web开发的新手,请帮助我。

我有两个功能:

def uploadFile(request):
    """
    this function submits an upload request from the page, and store the upload file to the database.
    """

def DoSomething(request):
    """
    this function parse the file uploaded from the function above.
    """

我认为在第一个函数中,上传的文件是局部变量,但会立即在第二个函数中使用。这两个函数都绑定到一个按钮。

问题是,如何将文件从第一个函数传递给第二个函数?

感谢您提前获得的帮助,我们非常感谢您的任何建议或提示。

0 个答案:

没有答案
相关问题