-, NameError: name '__file__' is not defined . __file__, filepath, .
, , os.path.join(os.path.dirname(__file__)) file.py, python file.py . , __file__ , filepath of file.py.
settings.py BASE_DIR = os.path.dirname(os.path.dirname(__file__)), Django. os.path.join() , :
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
TEMPLATE_DIRS = os.path.join(BASE_DIR, 'templates')
, Django, . Django?.