You are not logged in.

Change Language:

Freelancer? Consultant? Check out: WorkTrail - Time Tracking made easy
Board » General Category » General Discussion » __File__

Friends,

I am entirely new to Django and python.

I have configured Django with Python 2.7 in Apache2 and managed to setup my web site.

When i tried to create a static (index.html) file in the template directory, i face this error when i run the site.

<B>File "/home/aras/www/djangopro.local/public/settings.py", line 111, in <module>
os.path.join(os.path.dirname(_file_), 'templates'),

NameError: name '_file_' is not defined</b>

Please help/guide me to solve this issue.

Thanks a lot,
aras
Attachments
Hi,

your ticket object solve your problem :-)
Put double _ before and after file string like this -> __File__ (and not _File_)
That is all.





Powered by Sphene Community Tools