常规的模板渲染

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

相关文章:

  • 2021-08-21
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2021-08-01
猜你喜欢
  • 2022-02-02
  • 2022-12-23
  • 2021-07-04
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
相关资源
相似解决方案