Monday, 15 July 2013

django - Fields undefined -



django - Fields undefined -

i'm new django, decided seek tutorial.

and problem comes: added code 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) selection = models.charfield(max_length=200) votes = models.integerfield()

now have 4 error messages this:

undefined variable import: charfield models.py /mysite/polls line 4 pydev problem

but models.field class right.

what doing wrong?

don't know if help, python 3.3 , aptana studio 3 used. created project command line told in tutorial , copied .project , .pydevproject files , changed paths , names there.

upd: began work after changed python 3.3 python 2.7. unlimited!

django django-models

No comments:

Post a Comment