Hello I am trying to run this code in Jupyternote book.
When I run the command given in __init__.py
import os
BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
it gives me this error:
NameError Traceback (most recent call last)
<ipython-input-1-640754eed479> in <module>
2
3
----> 4 BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
NameError: name '__file__' is not defined
Can you tell me what possible error I am making here?
Hello I am trying to run this code in Jupyternote book. When I run the command given in
__init__.py
it gives me this error:
Can you tell me what possible error I am making here?