摘要:
如果页数太多的话,全部显示在页面上就会显得很冗杂 可以在页面中显示规定的页码数 例如: book_list.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>书籍列表</title> <link r 阅读全文
摘要:
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 阅读全文
摘要:
models.py: from django.db import models class Employee2(models.Model): name = models.CharField(max_length=16) age = models.IntegerField() salary = mod 阅读全文