Re: File Path Question

2013-06-25 Thread Bill Freeman
Try using single forward slashes in MEDIA_ROOT (and in other paths in settings.py). On Sat, Jun 22, 2013 at 3:46 AM, Nigel Legg wrote: > MEDIA_ROOT = 'c:\\stats_portal\\myproject\\myproject\\media\\' > > doesn't work. I've parsed the path to get this working for the time > being, thanks for yo

Re: File Path Question

2013-06-22 Thread Nigel Legg
MEDIA_ROOT = 'c:\\stats_portal\\myproject\\myproject\\media\\' doesn't work. I've parsed the path to get this working for the time being, thanks for your help. Regards, Nigel Legg 07914 740972 http://twitter.com/nigellegg http://uk.linkedin.com/in/nigellegg On 21 June 2013 19:09, Jacky Tian

Re: File Path Question

2013-06-21 Thread Jacky Tian
Have you set your MEDIA_ROOT appropriately in settings.py? Since fileview.py is where your original exception originated, can you post the relevant parts of the source in that file (whatever function line 5 belongs to). Did you get the exception under runserver or a "real" webserver? You should

Re: File Path Question

2013-06-21 Thread Bill Freeman
On Fri, Jun 21, 2013 at 11:34 AM, Nigel Legg wrote: > In the path shown in my previous email, documents is a subdirectory of the > media directory, which is set in settings.py. > No it's not a subdirectory. It begins with '/', so it is sought at the root of the filesystem. > > >>> IOError at /

Re: File Path Question

2013-06-21 Thread Jacky Tian
What does your project directory tree look like? I suspect the error has to do with where your documents/ directory is located in relation to the working directory. Try loading the document using a path relative to your project root. -Jacky Tian On Friday, June 21, 2013 9:29:20 AM UTC-4, Nige

Re: File Path Question

2013-06-21 Thread Nigel Legg
In the path shown in my previous email, documents is a subdirectory of the media directory, which is set in settings.py. views.py: from myproject.myapp.forms import DocumentForm def list(request): # Handle file upload if request.method == 'POST': form = DocumentForm(request.POST,

File Path Question

2013-06-21 Thread Nigel Legg
New to Django(ish). I'm not sure whether my error is coding or OS related: I am getting the following error message: IOError at /myapp/file_view/4/ [Errno 2] No such file or directory: 'documents/2013/06/20/testdata1.csv' Request Method: GET Request URL: http://127.0.0.1:8000/myapp/file_view/