-
Django settings tips
In django settings.py you need to insert absolute path on some settings like this :
MEDIA_ROOT = ‘/home/django/projects/media/’
But if your folder path is in your current django project, it is good idea to use relatif path, here the code :import os
rel = lambda *f: os.path.join(os.path.abspath(os.path.dirname(__file__)),*f)
Type that code in top of your settings.py. Than to use it :MEDIA_ROOT = rel(‘media’)