"""
Django settings for sitea project. For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
""" # 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
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ')2b10-c@pn4-uoi1z!$0s25h640hx^-48t1&(te_20!$hyr-84' # 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',
"account",
) 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', "account.middleware.LocaleMiddleware",
"account.middleware.TimezoneMiddleware",
) TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.tz',
# 'django.core.context_processors.request',
'django.contrib.messages.context_processors.messages', "account.context_processors.account",
) ROOT_URLCONF = 'sitea.urls' WSGI_APPLICATION = 'sitea.wsgi.application' # Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
} # Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/ LANGUAGE_CODE = 'zh-cn' TIME_ZONE = 'Asia/Shanghai' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/ STATIC_URL = '/static/'

setting.py的更多相关文章

  1. 配置python+mod_wsgi+apache 时 在浏览器中访问服务器时报错:Invalid HTTP_HOST header: 'XXXXX'. You may need to add u'XXXXX' to ALLOWED_HOSTS,在setting.py中添加‘*”无效的原因

    配置python+mod_wsgi+apache 时 在浏览器中访问服务器时报错:Invalid HTTP_HOST header: 'XXXXX'. You may need to add u'XX ...

  2. $Django setting.py配置 ,GET、POST深入理解,三件套,orm对象关系映射简介

    1 django中app的概念: 大学:----------------- 项目  信息学院 ----------app01  物理学院-----------app02 ****强调***:创建的每一 ...

  3. django1.8模板位置的设置setting.py

    大多数django教程比较老,给出的template的设置方案为: 更改工程下的setting.py文件, TEMPLATE_DIRS = (     os.path.join( APP_DIR, ' ...

  4. 接口测试框架——第一篇-大框架和setting.py常量文件

    基础知识已经准备的差不多了,今天开始我们就开始写我们的接口测试框架,框架结构已经说过了: 今天我们先完善需要的常量,也就是setting.py文件中的内容,代码如下: # coding: utf-8 ...

  5. django之配置文件setting.py

    一:配置文件setting.py中的简单配置更改 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 简单解释 ...

  6. python关于Django搭建简单博客项目 详解二-setting.py

    这一篇我们来讲解setting.py,具体内容以注释形式写入到下面的setting.py代码中,篇幅所限已把官方所给英文注释删除. 全部源代码和详解请参看http://github.com/Cheng ...

  7. django setting.py配置文件解读-02

    定义项目目录常量 import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR ...

  8. 【Django】如何自定义manage.py命令? 达到启动后台进程的目的?

    代码: #-*- coding:utf- -*- """ The handle active user mail send """ from ...

  9. Django学习之manage.py使用

    1.django-admin.py startproject mysite 开始一个项目,会初始化一些项目的结构文件 2.python manage.py runserver ip:port 如: p ...

随机推荐

  1. [LeetCode] Permutation in String 字符串中的全排列

    Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. I ...

  2. STM32 - GPIO

    买了一个STM32F4的开发板,想把上面的东西重新学一下 快速过: 一.GPIO控制 void GPIO_DeInit(GPIO_TypeDef* GPIOx); //把某一个IO口恢复到默认值 /* ...

  3. Lazy Loading | Explicit Loading | Eager Loading in EntityFramework and EntityFramework.Core

    EntityFramework Eagerly Loading Eager loading is the process whereby a query for one type of entity ...

  4. [SDOI 2016]征途

    Description 题库链接 将一个长度为 \(n\) 的正整数序列分为 \(m\) 段,问你这 \(m\) 段最小的方差 \(v\) 为多少.输出 \(v\times m^2\) . \(1\l ...

  5. [ZJOI2010]数字计数

    题目描述 给定两个正整数a和b,求在[a,b]中的所有整数中,每个数码(digit)各出现了多少次. 输入输出格式 输入格式: 输入文件中仅包含一行两个整数a.b,含义如上所述. 输出格式: 输出文件 ...

  6. [HNOI2012]排队

    题目描述 某中学有 n 名男同学,m 名女同学和两名老师要排队参加体检.他们排成一条直线,并且任意两名女同学不能相邻,两名老师也不能相邻,那么一共有多少种排法呢?(注意:任意两个人都是不同的) 输入输 ...

  7. poj 3264 & poj 3468(线段树)

    poj 3264 Sample Input 6 3 1 7 3 4 2 5 1 5 4 6 2 2 Sample Output 6 3 0 求任一区间的最大值和最小值的差 #include<io ...

  8. hdu 5643 BestCoder Round #75

    King's Game  Accepts: 249  Submissions: 671  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 6 ...

  9. hdu5631 BestCoder Round #73 (div.2)

    Rikka with Graph  Accepts: 123  Submissions: 525  Time Limit: 2000/1000 MS (Java/Others)  Memory Lim ...

  10. 一日一练-JS toString 和valueOf 方法的联系与区别

    子曰:类型转换中toString 和valueOf 的联系与区别分析 首先是看看ES5 的规范是如何进行说明的 在这里有几个基础知识点需要了解一下: [[Class]] [[Class]] 属于Obj ...