diff --git a/Python 12024年.doc b/Python 12024年.doc new file mode 100644 index 0000000..719b35e Binary files /dev/null and b/Python 12024年.doc differ diff --git a/Python程序设计课程设计报告模板 12024年.doc b/Python程序设计课程设计报告模板 12024年.doc deleted file mode 100644 index cb63d25..0000000 Binary files a/Python程序设计课程设计报告模板 12024年.doc and /dev/null differ diff --git a/app01/__pycache__/models.cpython-37.pyc b/app01/__pycache__/models.cpython-37.pyc index e3f0278..7c39af4 100644 Binary files a/app01/__pycache__/models.cpython-37.pyc and b/app01/__pycache__/models.cpython-37.pyc differ diff --git a/app01/migrations/0001_initial.py b/app01/migrations/0001_initial.py index c3ce8b3..f085ff5 100644 --- a/app01/migrations/0001_initial.py +++ b/app01/migrations/0001_initial.py @@ -92,7 +92,7 @@ class Migration(migrations.Migration): ('password', models.CharField(max_length=64, verbose_name='密码')), ('age', models.IntegerField(verbose_name='年龄')), ('account', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='账户余额')), - ('create_time', models.DateField(verbose_name='入职时间')), + ('create_time', models.DateField(verbose_name='注册时间')), ('gender', models.SmallIntegerField(choices=[(1, '男'), (2, '女')], verbose_name='性别')), ], ), diff --git a/app01/migrations/__pycache__/0001_initial.cpython-37.pyc b/app01/migrations/__pycache__/0001_initial.cpython-37.pyc index c6e420e..06988e1 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 f9a2fcf..41043e6 100644 --- a/app01/models.py +++ b/app01/models.py @@ -29,8 +29,8 @@ class UserInfo(models.Model): 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="入职时间") + # create_time = models.DateTimeField(verbose_name="注册时间") + create_time = models.DateField(verbose_name="注册时间") gender_choices = ( (1, "男"), (2, "女"), @@ -42,12 +42,6 @@ class Movie(models.Model): depart = models.ForeignKey(verbose_name="电影类别", to="Department", to_field="id", on_delete=models.CASCADE) desc = models.CharField(verbose_name='影片描述', max_length=256,default = '') - - - - -#什么东西啊啊啊 - class Order(models.Model): """ 订单 """ oid = models.CharField(verbose_name="订单号", max_length=64) diff --git a/app01/templates/user_add.html b/app01/templates/user_add.html index 5f17dc1..470a691 100644 --- a/app01/templates/user_add.html +++ b/app01/templates/user_add.html @@ -37,8 +37,8 @@
- - + +
diff --git a/app01/templates/user_list.html b/app01/templates/user_list.html index 10397d8..d874a9c 100644 --- a/app01/templates/user_list.html +++ b/app01/templates/user_list.html @@ -37,7 +37,7 @@ 密码 年龄 余额 - 入职时间 + 注册时间 性别 操作 diff --git a/app01/views/__pycache__/depart.cpython-37.pyc b/app01/views/__pycache__/depart.cpython-37.pyc index cfec33d..053bdb7 100644 Binary files a/app01/views/__pycache__/depart.cpython-37.pyc and b/app01/views/__pycache__/depart.cpython-37.pyc differ diff --git a/app01/views/depart.py b/app01/views/depart.py index 35d1bc4..882b91a 100644 --- a/app01/views/depart.py +++ b/app01/views/depart.py @@ -6,9 +6,9 @@ from app01.utils.form import UserModelForm def depart_list(request): - """ 部门列表 """ + """ 电影类别""" - # 去数据库中获取所有的部门列表 + # 去数据库中获取所有的电影类别 # [对象,对象,对象] queryset = models.Department.objects.all() @@ -16,7 +16,7 @@ def depart_list(request): def depart_add(request): - """ 添加部门 """ + """ 添加类别 """ if request.method == "GET": return render(request, 'depart_add.html') @@ -26,24 +26,24 @@ def depart_add(request): # 保存到数据库 models.Department.objects.create(title=title) - # 重定向回部门列表 + # 重定向回类别列表 return redirect("/depart/list/") def depart_delete(request): - """ 删除部门 """ + """ 删除电影类别 """ # 获取ID http://127.0.0.1:8000/depart/delete/?nid=1 nid = request.GET.get('nid') # 删除 models.Department.objects.filter(id=nid).delete() - # 重定向回部门列表 + # 重定向回电影类别 return redirect("/depart/list/") def depart_edit(request, nid): - """ 修改部门 """ + """ 修改类别 """ if request.method == "GET": # 根据nid,获取他的数据 [obj,] row_object = models.Department.objects.filter(id=nid).first() @@ -56,7 +56,7 @@ def depart_edit(request, nid): # models.Department.objects.filter(id=nid).update(title=title,其他=123) models.Department.objects.filter(id=nid).update(title=title) - # 重定向回部门列表 + # 重定向回电影类别 return redirect("/depart/list/") diff --git a/day16/__pycache__/urls.cpython-37.pyc b/day16/__pycache__/urls.cpython-37.pyc index 9368c5a..9f12859 100644 Binary files a/day16/__pycache__/urls.cpython-37.pyc and b/day16/__pycache__/urls.cpython-37.pyc differ diff --git a/day16/urls.py b/day16/urls.py index 234982a..4579c08 100644 --- a/day16/urls.py +++ b/day16/urls.py @@ -23,7 +23,7 @@ from app01.views import depart, user, admin, account, order,movie urlpatterns = [ # path('admin/', admin.site.urls), - # 部门管理 + # 电影类别管理 path('depart/list/', depart.depart_list), path('depart/add/', depart.depart_add), path('depart/delete/', depart.depart_delete), @@ -59,11 +59,8 @@ urlpatterns = [ path('order/detail/', order.order_detail), path('order/edit/', order.order_edit), - # 数据统计 - # 上传文件 - # 电影信息管理 path('movie/list/',movie.movie_list),