Django mysql

1. Mac10.8下安装mysql,在装10.7的DMG;

2. 编辑~/.profile,参见,生成model,会遇到unknown locale问题,见,所以添加下面的几行;

export ARCHFLAGS="-arch x86_64"

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/mysql/lib

export PATH=$PATH:/usr/local/mysql/bin

export PATH=$PATH:/Library/Python/2.7/site-packages/django/bin



export LANG="it_IT.UTF-8"

export LC_COLLATE="it_IT.UTF-8"

export LC_CTYPE="it_IT.UTF-8"

export LC_MESSAGES="it_IT.UTF-8"

export LC_MONETARY="it_IT.UTF-8"

export LC_NUMERIC="it_IT.UTF-8"

export LC_TIME="it_IT.UTF-8"

export LC_ALL=

3. 执行命令如下:

sudo easy_install mysql-python

 

然后照着Django的blog例子做,就可以配出blog的简单例子了。

你可能感兴趣的:(django)