In settings.py don’t write MEDIA_ROOT and TEMPLATE_DIRS as below (which is the default)
1 2
TEMPLATE_DIRS = ( "/home/html/project/templates",)
MEDIA_ROOT = "/home/html/project/appmedia/"
This will cause you no end of trouble as you switch platforms, attempt to have multiple instances installed on the same machine, etc.
Use the following instead -
1 2 3
SITE_ROOT = os.path.realpath(os.path.dirname(__file__))
MEDIA_ROOT = os.path.join(SITE_ROOT, 'appmedia')
TEMPLATE_DIRS = ( os.path.join(SITE_ROOT, 'templates'),)