[extensions-web/django/upgrade-1.8] settings: synchronized with default Django 1.8 template
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/django/upgrade-1.8] settings: synchronized with default Django 1.8 template
- Date: Wed, 26 Oct 2016 21:49:40 +0000 (UTC)
commit 9fe6636b81744e7aaaff1e34a18b4d81d725319c
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Thu Oct 27 00:41:25 2016 +0300
settings: synchronized with default Django 1.8 template
sweettooth/settings.py | 144 ++++++++++++++++++++++++++++--------------------
1 files changed, 84 insertions(+), 60 deletions(-)
---
diff --git a/sweettooth/settings.py b/sweettooth/settings.py
index 396aada..eedd29c 100644
--- a/sweettooth/settings.py
+++ b/sweettooth/settings.py
@@ -1,14 +1,76 @@
-# Django settings for sweettooth project.
+"""
+Django settings for sweettooth project.
+Generated by 'django-admin startproject' using Django 1.8.15.
+
+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/
+"""
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
+SITE_ROOT = os.path.dirname(os.path.abspath(__file__))
+
+BASE_DIR = os.path.dirname(SITE_ROOT)
+
+XAPIAN_DB_PATH = os.path.join(BASE_DIR, 'xapian.db')
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'tv(d+lom-sa^de5i#ab)(g^3249tbzssizuvh8m9_lwppdn1bw'
+
+# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+
+ 'registration',
+
+ # 'ratings' goes before django's comments
+ # app so it will find our templates
+ 'sweettooth.ratings',
+
+ 'django_comments',
+
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.staticfiles',
+ 'django.contrib.messages',
+
+ 'sweettooth.extensions',
+ 'sweettooth.auth',
+ 'sweettooth.review',
+ 'sweettooth.errorreports',
+ # Uncomment the next line to enable the admin:
+ 'django.contrib.admin',
+ # Uncomment the next line to enable admin documentation:
+ # 'django.contrib.admindocs'
)
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+)
-SITE_ROOT = os.path.dirname(os.path.abspath(__file__))
+ROOT_URLCONF = 'sweettooth.urls'
TEMPLATES = [
{
@@ -31,6 +93,12 @@ TEMPLATES = [
},
]
+WSGI_APPLICATION = 'sweettooth.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
+
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
@@ -38,35 +106,34 @@ DATABASES = {
}
}
-# Local time zone for this installation. Choices can be found here:
-# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
-# although not all choices may be available on all operating systems.
-# On Unix systems, a value of None will cause Django to use the same
-# timezone as the operating system.
-# If running in a Windows environment this must be set to the same as your
-# system time zone.
-TIME_ZONE = 'UTC'
-# Language code for this installation. All choices can be found here:
-# http://www.i18nguy.com/unicode/language-identifiers.html
+# Internationalization
+# https://docs.djangoproject.com/en/1.8/topics/i18n/
+
LANGUAGE_CODE = 'en-us'
-SITE_ID = 1
+TIME_ZONE = 'UTC'
-# If you set this to False, Django will make some optimizations so as not
-# to load the internationalization machinery.
USE_I18N = True
-# If you set this to False, Django will not format dates, numbers and
-# calendars according to the current locale
USE_L10N = True
+USE_TZ = False
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/1.8/howto/static-files/
+
+STATIC_URL = '/static/'
+
ADMINS = (
('Administrator', 'admin@localhost.local'),
)
MANAGERS = ADMINS
+SITE_ID = 1
+
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = os.path.join(SITE_ROOT, '..', 'uploaded-files')
@@ -90,51 +157,10 @@ STATICFILES_DIRS = (
os.path.join(SITE_ROOT, 'static'),
)
-# Make this unique, and don't share it with anybody.
-SECRET_KEY = 'tv(d+lom-sa^de5i#ab)(g^3249tbzssizuvh8m9_lwppdn1bw'
-
-MIDDLEWARE_CLASSES = (
- 'django.middleware.common.CommonMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
-)
-
-ROOT_URLCONF = 'sweettooth.urls'
-
ACCOUNT_ACTIVATION_DAYS = 5
LOGIN_URL = '/accounts/login/'
-INSTALLED_APPS = (
- 'django.contrib.auth',
-
- 'registration',
-
- # 'ratings' goes before django's comments
- # app so it will find our templates
- 'sweettooth.ratings',
-
- 'django_comments',
-
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.sites',
- 'django.contrib.staticfiles',
- 'django.contrib.messages',
-
- 'sweettooth.extensions',
- 'sweettooth.auth',
- 'sweettooth.review',
- 'sweettooth.errorreports',
-
- # Uncomment the next line to enable the admin:
- 'django.contrib.admin',
- # Uncomment the next line to enable admin documentation:
- # 'django.contrib.admindocs'
-)
-
COMMENTS_APP = 'sweettooth.ratings'
# A sample logging configuration. The only tangible logging
@@ -168,8 +194,6 @@ LOGGING = {
DEFAULT_FROM_EMAIL = "noreply gnome org"
-XAPIAN_DB_PATH = os.path.join(SITE_ROOT, '..', 'xapian.db')
-
THUMBNAIL_DEBUG = True
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]