how to read a static file in .py file using django ..
Posted
by zjm1126
on Stack Overflow
See other posts from Stack Overflow
or by zjm1126
Published on 2010-04-21T02:52:15Z
Indexed on
2010/04/21
2:53 UTC
Read the original article
Hit count: 301
this is my error code:
text = open('/media/a.txt', 'rb').read()
and my perplexed is:
when i use this :
text = open('a.txt', 'rb').read()
it can be running
but when i put the 'a.txt' to the 'media' folder, i can't running ,
why ?
thanks
IOError at /
[Errno 13] file not accessible: '/media/a.txt'
© Stack Overflow or respective owner