Skip to content

Commit

Permalink
Add Recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
KMhook committed Feb 18, 2012
1 parent 4013c8d commit 3eff132
Show file tree
Hide file tree
Showing 964 changed files with 168,773 additions and 843 deletions.
15 changes: 15 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 部署方法

1. pip install -r requirements.txt 安装依赖的包。
2. 配置数据库(步骤略)
3. python manage.py syncdb
4. python manage.py migrate
5. python manage.py collectstatic
6. 配置 nginx + gunicorn (步骤略)
7. 安装douban-python 与 gdata

## 补充说明

1. 本项目的 css 文件全部由 sass 源文件编译生成,如需修改,建议修改 sass 文件后重新编译。
2. Guardfile 文件主要用于 guard-livereload(开发期间使用),部署时不需要用到这个文件。
3. 请保证当前目录以及 uploads/ 目录可写,因为文件上传时会上传到 uploads/。
5 changes: 5 additions & 0 deletions build/pip-delete-this-directory.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This file is placed here by pip to indicate the source was put
here by pip.

Once this package is successfully installed this source code will be
deleted (unless you remove this file).
3 changes: 2 additions & 1 deletion contacts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Contact(models.Model):
phone = models.CharField(max_length=15, default='', verbose_name=u'电话号码')
qq = models.CharField(max_length=15, default='', verbose_name=u'QQ 号码')

douban_id = models.CharField(max_length=15, default='', verbose_name=u'豆瓣ID')
objects = ContactManager()


Expand All @@ -39,4 +40,4 @@ class ContactUploadForm(forms.Form):
class ContactEditForm(forms.ModelForm):
class Meta:
model = Contact
fields = ('fullname', 'email', 'phone', 'qq')
fields = ('fullname', 'email', 'phone', 'qq', 'douban_id')
Binary file added contacts/templates/contacts/.index.html.swp
Binary file not shown.
1 change: 1 addition & 0 deletions contacts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def edit(request):
contact.email = contact_info.get('email')
contact.phone = contact_info.get('phone')
contact.qq = contact_info.get('qq')
contact.douban_id = contact_info.get('douban_id')

form = ContactEditForm(instance=contact)
elif request.method == 'POST':
Expand Down
Loading

0 comments on commit 3eff132

Please sign in to comment.