Thursday, 12 September 2013

Access file from outside the project directory in Django python

Access file from outside the project directory in Django python

I have a file test.py outside my current Django project directory. How can
I import test.py into one of the python files(views.py) which are inside
my project directory?
test.py
def hello():
print 1+1
views.py
def dashboard(request):
a = hello();
print a

No comments:

Post a Comment