码迷,mamicode.com
首页 > 数据库 > 详细

Django下配置数据库

时间:2015-09-10 19:11:14      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

如下配置即可:

 1 DATABASES = { 
 2     default: {
 3         ENGINE: django.db.backends.mysql, # Add ‘postgresql_psycopg2‘, ‘mysql‘, ‘sqlite3‘ or ‘oracle‘.
 4         NAME: django,                      # Or path to database file if using sqlite3.
 5         USER: root,                      # Not used with sqlite3.
 6         PASSWORD: cdnunion,                  # Not used with sqlite3.
 7         HOST: localhost,                      # Set to empty string for localhost. Not used with sqlite3.
 8         PORT: 3306,                      # Set to empty string for default. Not used with sqlite3.
 9     }   
10 }

 

Django下配置数据库

标签:

原文地址:http://www.cnblogs.com/chris-cp/p/4798632.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!