This will output the first folder from app's root, which is what we need.
It works for me. My project is in /home/user/django-cms/project/project (which is my app's root)
settings.py is in /home/user/django-cms/project/project/project

However, if your solution works, I think it is better.