Blame view
weapp_sys/settings.py
4.28 KB
c51fd49af first add |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
""" Django settings for weapp_sys project. Generated by 'django-admin startproject' using Django 1.8. 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 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # 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 = 'y7m+ekd64@hxa0ej(&w6u!itch2glt)+6imlbr7ob8=_nk%@gi' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', |
1a597f51f add login token |
37 |
# 'django.contrib.sessions', |
c51fd49af first add |
38 39 40 41 42 43 |
'django.contrib.messages', 'django.contrib.staticfiles', 'homepage', ) MIDDLEWARE_CLASSES = ( |
1a597f51f add login token |
44 |
# 'django.contrib.sessions.middleware.SessionMiddleware', |
c51fd49af first add |
45 46 |
'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', |
1a597f51f add login token |
47 48 49 |
# 'django.contrib.auth.middleware.AuthenticationMiddleware', # 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', # 'django.contrib.messages.middleware.MessageMiddleware', |
c51fd49af first add |
50 51 |
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', |
1a597f51f add login token |
52 |
'middlewares.session_middleware.SessionWithoutLocalUserMiddleware', |
c51fd49af first add |
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
) ROOT_URLCONF = 'weapp_sys.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'weapp_sys.wsgi.application' AUTH_USER_MODEL = 'homepage.ForumUser' # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'forum', # Or path to database file if using sqlite3. # The following settings are not used with sqlite3: 'USER': 'root', |
1a597f51f add login token |
87 88 |
'PASSWORD': 'nineteen', 'HOST': '121.40.31.31', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. |
c51fd49af first add |
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
'PORT': '3306', } } # Internationalization # https://docs.djangoproject.com/en/1.8/topics/i18n/ LANGUAGE_CODE = 'zh-CN' TIME_ZONE = 'Asia/Shanghai' USE_I18N = True USE_L10N = True USE_TZ = False DATETIME_FORMAT = 'Y-m-d H:i:s' TIME_FORMAT = 'H:i:s' STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATIC_URL = '/static/' STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/static". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. # ("css", os.path.join(STATIC_ROOT,'css')), ("js", os.path.join(STATIC_ROOT, 'js')), ("image", os.path.join(STATIC_ROOT, 'image')), ("css", os.path.join(STATIC_ROOT, 'css')), ("dist", os.path.join(STATIC_ROOT, 'dist')), ("plugins", os.path.join(STATIC_ROOT, 'plugins')), ("fonts", os.path.join(STATIC_ROOT, 'fonts')), ("font-awesome", os.path.join(STATIC_ROOT, 'font-awesome')), ("img", os.path.join(STATIC_ROOT, 'img')), ("bootstrap", os.path.join(STATIC_ROOT, 'bootstrap')), ("apps/ueditor", os.path.join(STATIC_ROOT, 'ueditor')), ("echarts", os.path.join(STATIC_ROOT, 'echarts')), ("ueditor", os.path.join(STATIC_ROOT, 'ueditor')), ("ventor", os.path.join(STATIC_ROOT, 'ventor')), ) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' |
e11f60ade m |
138 139 140 |
LOGIN_URL = '/login/' AUTH_DOMAIN = 'https://api.xiuyetang.com/sys/user/login' |