常规的模板渲染

from django.db import models

# Create your models here.

class ArticalType(models.Model):
    caption = models.CharField(max_length=16)

class Category(models.Model):
    caption = models.CharField(max_length=16)

class Artical(models.Model):
    title = models.CharField(max_length=32)
    content = models.CharField(max_length=255)

    category = models.ForeignKey(Category, on_delete=models.CASCADE)
    artical_type = models.ForeignKey(ArticalType, on_delete=models.CASCADE)

models.py