In my views I have:
import csv
outputfile = open("test.csv", 'w')
I am getting a [Errno 13] Permission Denied
So I tried just opening the file:
outputfile = open("test.csv")
I am getting a [Errno 2] No such file or directory: 'test.csv' when I try to open it.
When I run the same line of code using python manage.py shell, the file opens without an error. test.csv is in the same folder as my views.
Why am I getting these errors and how do I go about fixing them?