Changeset - 8a8210108dc8
[Not reviewed]
default
0 1 0
Branko Majic (branko) - 12 years ago 2013-08-25 20:27:15
branko@majic.rs
DMT-1: Move the project root directory up one level. Include project templates path.
1 file changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
project/project_name/settings/base.py
Show inline comments
 
# Base Django settings for {{ project_name }} project.
 

	
 
#
 
# This file contains common settings shared amongst all instances of a
 
# project. Do not put any site-specific settings here.
 
#
 

	
 
from os import path
 

	
 
# Determine the Django project root directory.
 
PROJECT_ROOT = path.dirname(path.dirname(path.dirname(path.abspath(__file__))))
 
PROJECT_ROOT = path.dirname(path.dirname(path.abspath(__file__)))
 
ASSETS_ROOT = path.normpath(path.join(PROJECT_ROOT, "assets"))
 

	
 
# Language code for this installation. All choices can be found here:
 
# http://www.i18nguy.com/unicode/language-identifiers.html
 
LANGUAGE_CODE = 'en-us'
 

	
 
SITE_ID = 1
 

	
 
# If you set this to False, Django will make some optimizations so as not
 
# to load the internationalization machinery.
 
USE_I18N = True
 

	
 
@@ -73,27 +73,25 @@ MIDDLEWARE_CLASSES = (
 
    'django.contrib.auth.middleware.AuthenticationMiddleware',
 
    'django.contrib.messages.middleware.MessageMiddleware',
 
    # Uncomment the next line for simple clickjacking protection:
 
    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 
)
 

	
 
ROOT_URLCONF = '{{ project_name }}.urls'
 

	
 
# Python dotted path to the WSGI application used by Django's runserver.
 
WSGI_APPLICATION = '{{ project_name }}.wsgi.application'
 

	
 
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.
 
    path.normpath(path.join(PROJECT_ROOT, "templates"))
 
)
 

	
 
INSTALLED_APPS = (
 
    'django.contrib.auth',
 
    'django.contrib.contenttypes',
 
    'django.contrib.sessions',
 
    'django.contrib.sites',
 
    'django.contrib.messages',
 
    'django.contrib.staticfiles',
 
    # Uncomment the next line to enable the admin:
 
    'django.contrib.admin',
 
    # Uncomment the next line to enable admin documentation:
0 comments (0 inline, 0 general)