I keep getting errors while copying programmers' Janggo class, but I don't know where it went wrong. https://programmers.co.kr/learn/courses/6/lessons/470
https://programmers.co.kr/learn/courses/6/lessons/468
from django.db import models
# # Create your models here.
class Candidate(models.Model):
name = models.CharField(max_length=10)
introduction = models.Textfield()
area = models.CharField(max_length=15)
party_number = models.IntegerField(defalut=0)
File "C:\Users\yeonm\mysite\elections\models.py", line 9, in Candidate
introduction = models.Textfield()
AttributeError: module 'django.db.models' has no attribute 'Textfield'
PS C:\Users\yeonm\mysite>
It's a typo. Textfield() -> TextField()
AttributeError: module 'django.db.models' has no attribute 'Textfield'
is the description of the error.
© 2024 OneMinuteCode. All rights reserved.