0
나는 창 7을 사용하고 있습니다. 그리고 나는 장고 1.5와 파이썬 2.7을 가지고 있으며, Django 샘플을 자체 웹 사이트에서 실행하려고합니다. 주어진 구문을 사용하지만 명령을 실행할 때 : >>Django 구문 오류 양식 polls.models 가져 오기
Erro: G:\p\mysite>python manage.py shell Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information.(InteractiveConsole)
>>> help Type help() for interactive help, or help(object) for help about object.
>>> form polls.models import Poll File "<console>", line 1
form polls.models import Poll
^SyntaxError: invalid syntax
내 모델 :
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_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
내가 파이썬에서 새로운 해요, 어떤 도움에 감사드립니다>from polls.models import Poll, Choice
나는 구문을 얻을.