SyntaxFix
Write A Post
Hire A Developer
Questions
I think the easiest thing to do is just to reuse dirname() So you can call
os.path.dirname(os.path.dirname( __file__ ))
if you file is at /Users/hobbes3/Sites/mysite/templates/method.py
This will return "/Users/hobbes3/Sites/mysite"