Django template not loaded when deploy on openshift
Question: Totally new to Openshift and has been following various stepbystep guides.
Able to get django 1.6, Python 2.7 and Mezzanine 3.0.9 up with the application
working - partially. For some reason, the template is not loaded, both if the
template is part of a HTML include tag or a part of view.py.

When tailing access-log, cannot see errors or anything to go by. The
settings.py has

    
    
    PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
    PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1]
    TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),) 
    

It seems to not be able to find the path of the template files but don't know
why as the value of TEMPLATE_DIRS seems to be correct when checking it.
Everything is working ok on my local machine but not on Openshift. Any
pointers are much appreciated as have been googling and search around for a
few days and still get no where.

Thank you.

EDIT: Decide to turn on DEBUG mode and that is a lot clearer to investigate.
Turns out that without providing absolute module name when importing a method
the application just fail but this is not the case on local machine. e.g.
instead of providing from projectname.appname.view import some_function I was
putting from appname.view import some_function

Silly me. That teach me a good few days lesson!!!durr!!


Answer: Problem is resolved by providing a full module name to the import statement.
e.g.

    
    
        from projectname.appname.view import some_function 
    

I had, see below, and that caused the issue.

    
    
        from appname.view import some_function
    

Once a full module name is provided, it all works perfectly.

Thank you.

