123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- """
- Django settings for swyzxwb_photovote 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 = '3er162(x&!cye3vmul-ynw+9+!353@lz0e7n-5gmixm5=n)man'
- # 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',
- 'south',
- 'bootstrap3',
- 'UserManage',
- 'vote',
- )
- 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 = 'swyzxwb_photovote.urls'
- WSGI_APPLICATION = 'swyzxwb_photovote.wsgi.application'
- # Database
- # https://docs.djangoproject.com/en/1.6/ref/settings/#databases
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.mysql',
- 'NAME': 'xwbphotovote',
- 'USER': 'swzry',
- 'PASSWORD': 'ZPCZRY789987/.,',
- 'HOST': '127.0.0.1',
- 'PORT': '3306',
- }
- }
- # Internationalization
- # https://docs.djangoproject.com/en/1.6/topics/i18n/
- LANGUAGE_CODE = 'zh-hans'
- TIME_ZONE = 'Asia/Shanghai'
- USE_I18N = False
- USE_L10N = False
- USE_TZ = False
- AUTH_USER_MODEL = 'UserManage.User'
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/1.6/howto/static-files/
- STATIC_URL = '/static/'
- STATICFILES_DIRS = (
- os.path.join(BASE_DIR,'static'),
- )
- MEDIA_ROOT = os.path.join(STATICFILES_DIRS[0],'uploads')
- MEDIA_URL = '/static/uploads/'
- PHOTO_SIZE_LIMIT = 307200
- PHOTO_SUFFIX_LIMIT = ['.jpg','.jpeg','.png','.gif','.bmp','.svg','.wmf']
- #set TEMPLATE_DIRS
- TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
- #TEMPLATE zh_CN
- FILE_CHARSET='utf-8'
- DEFAULT_CHARSET='utf-8'
|