django 购物系统
valexchao
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
django 购物系统 - admin注册和验证
添加admin应用 注册模型至admin 为模型字段添加自定义验证 提交代码到远程仓库的feature-catalog分支 ------------------ 实现 新建forms.py 用于验证模型的字段验证 from django import forms from .models import Product class ProductAdmin转载 2016-05-09 21:25:31 · 795 阅读 · 0 评论 -
django 购物系统 - 购物车模型
*购物车需求 单独的购物车页面 购物车可以调整商品数量 商品页面可以添加至购物车 购物车可以删除商品 查看所选商品的信息及金额 匿名用户也可以使用购物车 代码 class CartItem(models.Model): cart_id = models.CharField(max_length=50) date_added = models.Date转载 2016-05-12 19:08:57 · 1884 阅读 · 0 评论 -
django 购物系统 - session
*session是什么? http无状态, 用于会话控制,保存会话状态,存放在服务端 *session和cookie的区别和练习 都是保存会话的机制,cookie存放于客户端,可以被篡改,session放在服务端,安全性大大提高,但会增加服务器额外开销,存放在服务器的内存中。 session id 存放在cookie *为什么使用session 为了保存会话 *django中使用se转载 2016-05-12 19:35:56 · 1026 阅读 · 0 评论 -
django 购物系统 - 代码传到github
注册github账号 Create a new repository 项目主目录下 git init git config --global user.email kaka@qq.com" git config --global user.name "valexchao" echo "# shopsys" >> README.md git add . git commit原创 2016-05-08 11:19:46 · 1100 阅读 · 0 评论 -
django 购物系统 - 环境准备
安装vagrant https://www.vagrantup.com/downloads.html 安装virtualbox https://www.virtualbox.org/wiki/Downloads http://www.vagrantbox.es/> $ vagrant box add {title} {url} $ vagrant init {titl原创 2016-05-08 10:58:00 · 1612 阅读 · 0 评论 -
django 购物系统 - 开发环境搭建
*安装ubuntu虚拟机 *安装pyenv http://www.it165.net/pro/html/201405/13603.html 0) 可能需要更新apt-get sudo apt-get update 1) 安装curl和git sudo apt-get install curl git-core 2) 安装pyenv http://my.oschina.转载 2016-05-08 10:57:31 · 1226 阅读 · 0 评论 -
django 购物系统 - Zsh
安装zsh 如果你用 Ubuntu Linux sudo apt-get install zsh 安装完成后设置当前用户使用 zsh chsh -s /bin/zsh 安装 oh my zsh $ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.原创 2016-05-08 11:36:20 · 756 阅读 · 0 评论 -
django 购物系统 mysql
#安装mysql sudo apt-get install mysql-server #创建数据库和用户 CREATE DATABASE shopsys CHARACTER SET utf8; CREATE USER 'shopsys'@'localhost' IDENTIFIED BY '888444'; GRANT ALL ON shopsys.* TO 'shopsys';原创 2016-05-08 14:04:53 · 721 阅读 · 0 评论 -
django 购物系统 - 创建模型
1. 前置准备 ER图 - 实体关系模型设计 UML类图 - 类的设计 2.Category模型 3.Product模型 4 django常用字段类型 BooleanField CharField TextField DateField DateTimeField DecimalField FileField FilePathField Floa转载 2016-05-09 19:53:00 · 1036 阅读 · 0 评论 -
django 购物系统 - 添加至购物车表单
商品的详情页面的添加至购物车表单 定义form class ProductAddToCartForm(forms.Form): quantity = forms.IntegerField(label='数量', widget=forms.TextInput(转载 2016-05-12 21:00:20 · 1556 阅读 · 0 评论
分享