I'm new to Django, so I decided to try the tutorial.
And then the problem comes: I added some code to polls/models.py
from django.db import models
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
votes = models.IntegerField()
Now I have four error messages like this:
Undefined variable from import: CharField models.py /Mysite/polls line 4 PyDev Problem
But the models.Field class is all right.
What am I doing wrong?
Don't know if it will help, but Python 3.3 and Aptana Studio 3 are used. I created the project from the command line like it is told in the tutorial and then copied .project and .pydevproject files and changed paths and names there.
UPD: Everything began to work after I changed Python 3.3 for Python 2.7. Thanks to UnLiMiTeD!