The following is my file deletion code:
path = settings.MEDIA_ROOT
os.remove(os.path.join(path, file_name))
When run I get the following HTTP 500 error:
WindowsError at /project/delete_files/
[Error 2] The system cannot find the file specified: u'C:\DjangoEmt/static/uploads/bridge.jpg'
I have checked the file exists in the directory. Can someone please help me as to why its not working.
Sidenote: I am using ajax in django if this makes any difference.