I\'m developing Django apps on my local windows machine then deploying to a hosted linux server. The format for paths is different between the two and manually replacing before
Add
import os.path
BASE_PATH = os.path.dirname(__file__)
at the top of your settings file, and then use BASE_PATH
everywhere you want to use a path relative to your Django project.
For example:
MEDIA_ROOT = os.path.join(BASE_PATH, 'media')
(You need to use os.path.join(), instead of simply writing something like MEDIA_ROOT = BASE_PATH+'/media'
, because Unix joins directories using '/', while windows prefers '\')