Mezzanine

文章目录

安装mezzanine

#首先准备安装pip(pip用来安装python软件包)
#用的Linux自带python2环境,所以在此安装python2的pip
yum install python2-pip -y
#(修改pip源为阿里源)在文件~/.pip/pip.conf中添加或修改:
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com
#
pip install mezzanine
cd /opt
#创建一个LIUlaoLiu的项目
mezzanine-project LIUlaoLiu
cd LIUlaoLiu
vim LIUlaoLiu/local_settings.py 
#修改
"ENGINE": "django.db.backends.sqlite3",
#改为
"ENGINE": "django.db.backends.mysql",
#将
"NAME": "dev.db",
改为liu(数据库的名字)
"NAME": "liu",
#修改完成之后的
DATABASES = {
    "default": {
        # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
        "ENGINE": "django.db.backends.mysql",
        # DB name or path to database file if using sqlite3.
        "NAME": "liu",
        # Not used with sqlite3.
        "USER": "liu",
        # Not used with sqlite3.
        "PASSWORD": "123456",
        # Set to empty string for localhost. Not used with sqlite3.
        "HOST": "localhost",
        # Set to empty string for default. Not used with sqlite3.
        "PORT": "3306",
    }





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值