Django在视图中写入csv不起作用

时间:2017-04-26 14:56:12

标签: python django csv

在我看来,我有:

import csv 
outputfile = open("test.csv", 'w')

我收到[Errno 13] Permission Denied

所以我试着打开文件:

outputfile = open("test.csv")

我尝试打开时收到[Errno 2] No such file or directory: 'test.csv'

当我使用python manage.py shell运行相同的代码行时,文件会打开而不会出现错误。 test.csv与我的观看文件位于同一文件夹中。

为什么我会收到这些错误?如何修复错误?

0 个答案:

没有答案
相关问题