Latest 100 public snipts »
Fotinakis's
snipts » settings
showing 1-1 of 1 snipts for settings
-
∞ Dynamic directories in Django settings.py
# In settings.py PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) ROOT_DIR = os.path.split(PROJECT_DIR)[0] MEDIA_ROOT = ROOT_DIR + '/static/' MEDIA_URL = '/static/' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. PROJECT_DIR + '/templates/', )


