template里调用这些数据
return render_to_response("chat/index.html", {'user': user, 'RoomObj': RoomObj})
我们还需要改一下之前用户认证里的...(ChatRoom)
启动应用,然后访问http://IP/admin
在admin中添加两个聊天室
4.编辑template文件
首先在templates下创建两个创建两个目录,layout和chat...,更改密码,编辑资料等
<a href="#" class="dropdown-toggle" data-toggle...然后我们登录,用户密码就是之前在syncdb时,系统提示我们创建的用户
登陆成功后就会跳转到首页,聊天室的名字是之前在admin中创建的
?...到这里我们的首页就搞定了,聊天室的页面我们下次再更新
源码地址: https://github.com/cheney93/ChatRoom