zubin71 wrote:
> >From a method defined in a view i need to get the source of an html
> file in the templates directory. This is how i tried it out. An error
> occurs at the line,
>
> f = open(os.path.join(os.getcwd(), '../templates/test.html'), 'r') ;
>   
the output of your os.path.join is something like
'/your/current/workingdir/../templates/test.html'
> However, this causes an error, "File or directory not found".
>
> What do i do? Please help.
>   
if you want to get a dir a level over your actual workingdir you should
maybe slice the output of os.getcwd() and add the right from there on..

> thankx in advance,
> zubin71
>   

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to