python 更改模板路径
2015-09-02 00:00
465 查看
打开setting文件,加入最后一行代码
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.7/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.7/howto/static-files/
STATIC_URL = '/static/'
TEMPLATE_DIRS=(os.path.join(BASE_DIR,'templates'),)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.7/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.7/howto/static-files/
STATIC_URL = '/static/'
TEMPLATE_DIRS=(os.path.join(BASE_DIR,'templates'),)
相关文章推荐
- python中list去重问题
- python 基础格式化输出
- 或许是python yield最好的答案 ?
- python爬虫备忘 9.1所学
- Python 异常处理
- 给python交互式命令行增加自动补全和命令历史
- python基础练习2
- Python: Window 64位 Python 使用PIL && 验证码生成
- Python 包
- python 自动补全
- numpy.nonzero函数
- Python模块
- 多维标度法(MDS)的Python实现
- python 接收邮件
- Python--Tkinter之Listbox()
- python 更新谷歌hosts
- Python 读Dict数据的方法,解决key 不在dict的问题,get()函数,setdefault()函数
- Python正则表达式指南
- Python RE模块中search()和match()的区别
- 2015/9/1 Python基础(6):列表