AutoField: int 自增列,必须填入参数 primary_key=True 如果没有写 AutoField,则会自动创建一个列名为 id 的列 from django.db import models class Person(models.Model): id = models.AutoField(primary_key=True) # 自增的 id 主键 CharField: 字符类型,必须提供 max_length 参数, max_length 表示最大字符长度 from dja…
# coding=utf-8 2 """ 3 Demonstrates how to use the background scheduler to schedule a job that executes on 3 second 4 intervals. 5 """ 6 7 from datetime import datetime 8 import time 9 import os 10 11 from apscheduler.schedul…