Commit 9eaf6530 authored by jackfrued's avatar jackfrued

更新了Django第二天的文档

parent 09a4ec0d
venv
.idea
*.pyc
Day31/res/django-index-1.png

154 KB

Day31/res/django-index-2.png

154 KB

Day31/res/django-version.png

42.5 KB

Day31/res/http-request.png

5.95 KB

Day31/res/http-response.png

6.4 KB

File moved
This diff is collapsed.
from django.db import models
# ORM - 对象关系映射
# 对象模型 <---> 关系模型
# 实体类 <---> 二维表
# 属性 <---> 列
# 对象 <---> 记录
class Dept(models.Model):
no = models.IntegerField(primary_key=True, verbose_name='部门编号')
name = models.CharField(max_length=20, verbose_name='部门名称')
location = models.CharField(max_length=10, verbose_name='部门所在地')
# excellent = models.BooleanField(default=0, verbose_name='是否优秀')
def __str__(self):
return self.name
class Meta:
db_table = 'tb_dept'
......
Day32/res/er-graph.png

165 KB

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment