Python 我迷路了,帮帮我
我正在尝试使用python manage.py migrate,但出现了错误。 请告诉我我做错了什么:Python 我迷路了,帮帮我,python,django,Python,Django,我正在尝试使用python manage.py migrate,但出现了错误。 请告诉我我做错了什么: from django.db import models class Topic(models.Model): Top_name = models.CharField(max_length=264,unique=True) def __str__(self): return self.Top_name
from django.db import models
class Topic(models.Model):
Top_name = models.CharField(max_length=264,unique=True)
def __str__(self):
return self.Top_name
class WebPage(models.Model):
topics = models.ForeginKey(Topic)
name = models.CharField(max_length=264,unique=True)
url = models.UrlField(unique=True)
def __str__(self):
return self.name
class AccessRecord(models.Model):
name = models.ForeginKey(Webpage)
date = models.DateField()
def __str__(self):
return str(self.date)
错误:
您使用了ForegingKey而不是ForegingKey。“i”放错地方了。Foregin不是应该怎么拼写的。
File "E:\My_jango_code\sixth_project\sixth_app\models.py", line 15, in WebPage
topics = models.ForeginKey(Topic)
AttributeError: module 'django.db.models' has no attribute 'ForeginKey'