"""
Django settings for DjangoWeb project.
Generated by 'django-admin startproject' using Django 1.8.2.
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 = 'l-hvca7i!eeilcxx^v)9xq6(pzlf$kc*6=%vtq&yor2*ce=_n2'
# 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',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'LoginApp'
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
ROOT_URLCONF = 'DjangoWeb.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 = 'DjangoWeb.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/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.8/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
STATIC_URL = '/static/'
STATICFILE_DIRS=(
os.path.join(BASE_DIR,"static")
)
没有合适的资源?快使用搜索试试~ 我知道了~
django 初步简单框架
共36个文件
py:12个
pyc:10个
html:7个
需积分: 12 11 下载量 36 浏览量
2017-10-25
16:59:14
上传
评论
收藏 22KB RAR 举报
温馨提示
我自己做的一个初步开发的django简单页面,其中包含了MTV三个阶层的东东,重点的是理解,后面的就简单了,其中包含django的模板使用以及数据库的连接,这里的数据库用的是sqlite3 ,django自带的东西
资源推荐
资源详情
资源评论
收起资源包目录
DjangoWeb.rar (36个子文件)
DjangoWeb
templates
sucess.html 560B
error.html 159B
testInclude.html 172B
loginError.html 177B
login.html 367B
listUser.html 469B
userExit.html 215B
DjangoWeb
__pycache__
urls.cpython-36.pyc 1KB
__init__.cpython-36.pyc 129B
settings.cpython-36.pyc 2KB
wsgi.cpython-36.pyc 536B
wsgi.py 395B
__init__.py 0B
settings.py 3KB
urls.py 889B
static
db.sqlite3 132KB
.idea
DjangoWeb.iml 1KB
misc.xml 973B
.name 9B
modules.xml 270B
encodings.xml 159B
workspace.xml 36KB
manage.py 252B
LoginApp
models.py 208B
__pycache__
admin.cpython-36.pyc 247B
views.cpython-36.pyc 1KB
__init__.cpython-36.pyc 128B
models.cpython-36.pyc 400B
__init__.py 0B
migrations
__pycache__
0001_initial.cpython-36.pyc 680B
__init__.cpython-36.pyc 139B
__init__.py 0B
0001_initial.py 541B
views.py 2KB
admin.py 176B
tests.py 60B
共 36 条
- 1
资源评论
今天老子来巡山
- 粉丝: 40
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功