Problems with default settings.py file

76 views
Skip to first unread message

Blake Adams

unread,
Dec 2, 2013, 10:40:52 AM12/2/13
to django...@googlegroups.com
Hello I am a python noob going through the getttingstarted with django tutorial.

For some reason When I start a new project, the default settings.py file is missing a lot of default settings (Admin, Media, Some of the Databse info, Statis_file, Logging, etc.).  Im looking for any direction on why this is happening and what I might be doing wrong.  Thanks!

Here is my current complete settings file below (version that gets created with missing info):

"""
Django settings for microblog2 project.

For more information on this file, see

For the full list of settings and their values, see
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'microblog2.urls'

WSGI_APPLICATION = 'microblog2.wsgi.application'


# Database

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

# Internationalization

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)

STATIC_URL = '/static/'

Felipe Coelho

unread,
Dec 2, 2013, 11:03:54 AM12/2/13
to Django users
2013/12/2 Blake Adams <blake...@gmail.com>
They are not "missing", they are just not specified. In 1.5, a lot of settings were present in the default settings file but they only contained the default values for those settings, you could easily remove them and nothing would change.

1.6 simplified [1] the default project template, it's a lot less confusing for someone who's just starting with Django, and if you need the extras, take a look at the settings reference [2].

Blake Adams

unread,
Dec 2, 2013, 1:35:59 PM12/2/13
to django...@googlegroups.com
Thanks Felipe!
Reply all
Reply to author
Forward
0 new messages