练手项目,欢迎轻喷。。。
这是用django搭建的TODO management and reassignment platform,可以用它很方便直观地管理team的TODO list。项目的代码已经扔到github上面,可以直接从github clone代码到本地->
git clone https://github.com/andward/AndwardTODO.git
本地项目搭建(Linux)
下载依赖包
项目clone下来后,cd进入项目文件夹。如果你没有用过python的话,那么需要先装一个pyhton的工具pip,基本上python所有的主流依赖包都在其pypi的服务器上面。执行以下命令:
pip install -r requirements.txt
跑完后django等依赖包已经安装在你的电脑上,版本是1.5.5。可以测试一下:
>>python
>>import django
>>django.VERSION
设置你的MySQL
假设你已经装了MySQL,新建一个utf8的数据库:
>>mysql -u root -p
>>create database todo character set utf8
编辑settings:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # mysql
'NAME': 'todo', # Your database name
'USER': 'root', # root
'PASSWORD': 'your password', # your root password
'HOST': 'localhost',
'PORT': '3306',
}
}
Migrate你的数据库表:
>>cd AndwardTODO
>>python manage.py syncdb
启动local server
运行以下命令:
python manage.py runserver
访问http://127.0.0.1:8000/task/tag/ALL
,就可以看到真容了~
下面是一些项目截图: