所以我正在关注 Jacob Kaplan-Moss 的 Django 入门教程,他要求在models.py
from django.db import models
class Package(models.Model):
name = models.CharField(max_length=300)
version = models.CharField(max_length=300,
blank=True)
home_page = models.URLField(blank=True)
summary = models.TextField()
description = models.TextField(blank=True)
keyboards = models.TextField(blank=True)
categories = models.ManyToManyField(Category,
related_name="packages")
但是,当我运行时manage.py validate
,它指出“类别”无法识别。我只是不知道他到底想做什么。