# # Base settings for Django project {{ project_name }}. These settings are shared # across all environments. # # Project created from template using Django {{ django_version }}. # # In order to specify environment-specific settings, use files: # # development.py # testing.py # staging.py # production.py # # For more information on this file see # https://docs.djangoproject.com/en/1.8/topics/settings/ # # For the full list of settings and their values, see # https://docs.djangoproject.com/en/1.8/ref/settings/ # Base paths for accessing project root directory and directory where assets are # stored. Other paths can be built relative to these directories with: # os.path.join(BASE_DIR, ...) # os.path.join(ASSETS_DIR, ...) import os # Base and assets project directories. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ASSETS_ROOT = os.path.normpath(os.path.join(BASE_DIR, "assets")) # List of installed applications. INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ) # List of middleware classes to apply to incoming requests. MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', ) # URL configuration to use for serving project root. ROOT_URLCONF = '{{ project_name }}.urls' # Template lookup and rendering configuration. TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] # WSGI application module for running the project. WSGI_APPLICATION = '{{ project_name }}.wsgi.application' # Language, internationalisation, and time configuration. # # For details see # https://docs.djangoproject.com/en/1.8/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'Europe/Stockholm' USE_I18N = True USE_L10N = True USE_TZ = True # URLs for serving the static and media files. STATIC_URL = '/static/' MEDIA_URL = '/media/' # Directory for storing and serving user-uploaded files. MEDIA_ROOT = os.path.normpath(os.path.join(ASSETS_ROOT, "media")) # Directory for storing and serving static files. STATIC_ROOT = os.path.normpath(os.path.join(ASSETS_ROOT, "static")) # Additional directories from which to read the static files. This can be # used for overriding application static files on project basis. STATICFILES_DIRS = ( os.path.normpath(os.path.join(BASE_DIR, "static")), )