Re: Error in shell when following Django tutorial

9 views
Skip to first unread message

Ramiro Morales

unread,
Aug 9, 2014, 6:45:39 PM8/9/14
to django...@googlegroups.com

Ramiro Morales
@ramiromorales
On Aug 9, 2014 7:13 PM, "Daniel Grace" <danw...@gmail.com> wrote:
>
> I get an error in the shell when following the tutorial
> https://docs.djangoproject.com/en/1.6/intro/tutorial01/
>
> C:\Users\Daniel\My Documents\Python\DjangoTest\mysite>python manage.py shell
> Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AM
> D64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)
> >>> from polls.model import Poll, Choice
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> ImportError: No module named 'polls.model'
> >>> from polls.model import Poll, Choice
>

The name the Python module you've created/modified in a prior step and need to import now is 'models'. Note how it's in plural while you are trying to import 'model'.

Reply all
Reply to author
Forward
0 new messages