标签:util http lazy max seq default sem set rate
from django.db import models from utils.MyBaseModel import Base
class Chapters(Base):
title = models.CharField(‘章标题‘, max_length=24)
serial_num = models.IntegerField(‘章序号‘)
course = models.ForeignKey(Course, related_name=‘chapters‘, on_delete=models.SET_NULL, null=True)
from django.contrib import admin from . import models
admin.site.register(models.CourseType) admin.site.register(models.CourseTag)
admin.site.register(models.Course)
admin.site.register(models.Sections)
admin.site.register(models.Chapters)
python manage.py makemigrations
python manage.py migrate
标签:util http lazy max seq default sem set rate
原文地址:https://www.cnblogs.com/SHHD/p/13935942.html