摘要: 如果页数太多的话,全部显示在页面上就会显得很冗杂 可以在页面中显示规定的页码数 例如: book_list.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>书籍列表</title> <link r 阅读全文
posted @ 2019-08-09 22:12 Sch01aR# 阅读(909) 评论(0) 推荐(0) 编辑
摘要: models.py: from django.db import models class Book(models.Model): title = models.CharField(max_length=32) def __str__(self): return self.title class M 阅读全文
posted @ 2019-08-09 17:23 Sch01aR# 阅读(361) 评论(0) 推荐(0) 编辑
摘要: models.py: from django.db import models class Employee2(models.Model): name = models.CharField(max_length=16) age = models.IntegerField() salary = mod 阅读全文
posted @ 2019-08-09 00:27 Sch01aR# 阅读(366) 评论(0) 推荐(0) 编辑