How about using __file__, it will give us location of tools.py. Then we know location of templates due to predefined structure of DAS code. Or make it read env variable which we can setup in manage script. The env will point to DAS_ROOT and from there you'll read location of template dir.