Hi Jonathan,
the cleanest way I found:
at the beginning of your settings.py add
import os
BASE_PROJECT = os.path.dirname(__file__)
then when the section comes
MEDIA_ROOT = os.path.join(BASE_PROJECT,'media')
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(BASE_PROJECT,'static')
STATIC_URL = '/static/'
and in some cases I also add the static inside the apps like this
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or
"C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(BASE_PROJECT, 'newApp','static')
)
Julio,
--
Julio Molina Soler
julio....@telenet.be
Github:
https://github.com/jmolinaso