diff --git a/Python程序设计课程设计报告模板 12024年.doc b/Python程序设计课程设计报告模板 12024年.doc index 8b5bb10..cb63d25 100644 Binary files a/Python程序设计课程设计报告模板 12024年.doc and b/Python程序设计课程设计报告模板 12024年.doc differ diff --git a/app01/__pycache__/models.cpython-37.pyc b/app01/__pycache__/models.cpython-37.pyc index a525912..e3f0278 100644 Binary files a/app01/__pycache__/models.cpython-37.pyc and b/app01/__pycache__/models.cpython-37.pyc differ diff --git a/app01/migrations/__pycache__/0001_initial.cpython-37.pyc b/app01/migrations/__pycache__/0001_initial.cpython-37.pyc index 998d482..c6e420e 100644 Binary files a/app01/migrations/__pycache__/0001_initial.cpython-37.pyc and b/app01/migrations/__pycache__/0001_initial.cpython-37.pyc differ diff --git a/app01/models.py b/app01/models.py index 5ef5608..f9a2fcf 100644 --- a/app01/models.py +++ b/app01/models.py @@ -16,7 +16,7 @@ class Admin(models.Model): class Department(models.Model): - """ 部门表 """ + """电影类别""" title = models.CharField(verbose_name='标题', max_length=32) def __str__(self): @@ -24,29 +24,13 @@ class Department(models.Model): class UserInfo(models.Model): - """ 员工表 """ + """ 用户 """ name = models.CharField(verbose_name="姓名", max_length=16) password = models.CharField(verbose_name="密码", max_length=64) age = models.IntegerField(verbose_name="年龄") account = models.DecimalField(verbose_name="账户余额", max_digits=10, decimal_places=2, default=0) # create_time = models.DateTimeField(verbose_name="入职时间") create_time = models.DateField(verbose_name="入职时间") - - # 无约束 - # depart_id = models.BigIntegerField(verbose_name="部门ID") - # 1.有约束 - # - to,与那张表关联 - # - to_field,表中的那一列关联 - # 2.django自动 - # - 写的depart - # - 生成数据列 depart_id - # 3.部门表被删除 - # ### 3.1 级联删除 - - # ### 3.2 置空 - # depart = models.ForeignKey(to="Department", to_field="id", null=True, blank=True, on_delete=models.SET_NULL) - - # 在django中做的约束 gender_choices = ( (1, "男"), (2, "女"), @@ -59,40 +43,9 @@ class Movie(models.Model): desc = models.CharField(verbose_name='影片描述', max_length=256,default = '') -class PrettyNum(models.Model): - """ 靓号表 """ - mobile = models.CharField(verbose_name="手机号", max_length=11) - # 想要允许为空 null=True, blank=True - price = models.IntegerField(verbose_name="价格", default=0) - - level_choices = ( - (1, "1级"), - (2, "2级"), - (3, "3级"), - (4, "4级"), - ) - level = models.SmallIntegerField(verbose_name="级别", choices=level_choices, default=1) - status_choices = ( - (1, "已占用"), - (2, "未使用") - ) - status = models.SmallIntegerField(verbose_name="状态", choices=status_choices, default=2) -class Task(models.Model): - """ 任务 """ - level_choices = ( - (1, "紧急"), - (2, "重要"), - (3, "临时"), - ) - level = models.SmallIntegerField(verbose_name="级别", choices=level_choices, default=1) - title = models.CharField(verbose_name="标题", max_length=64) - detail = models.TextField(verbose_name="详细信息") - - # user_id - user = models.ForeignKey(verbose_name="负责人", to="Admin", on_delete=models.CASCADE) #什么东西啊啊啊 class Order(models.Model): @@ -110,17 +63,4 @@ class Order(models.Model): admin = models.ForeignKey(verbose_name="管理员", to="Admin", on_delete=models.CASCADE) -class Boss(models.Model): - """ 老板 """ - name = models.CharField(verbose_name="姓名", max_length=32) - age = models.IntegerField(verbose_name="年龄") - img = models.CharField(verbose_name="头像", max_length=128) - -#我哪里来的老板啊 -class City(models.Model): - """ 城市 """ - name = models.CharField(verbose_name="名称", max_length=32) - count = models.IntegerField(verbose_name="人口") - # 本质上数据库也是CharField,自动保存数据。 - img = models.FileField(verbose_name="Logo", max_length=128, upload_to='city/') diff --git a/app01/templates/layout.html b/app01/templates/layout.html index 22a4198..71c05d5 100644 --- a/app01/templates/layout.html +++ b/app01/templates/layout.html @@ -49,7 +49,7 @@
  • 电影信息
  • 电影分类
  • 订单中心
  • -
  • 留言管理
  • +