Are you sure that you don't have something like:

...
urlpatterns = patterns('polls.views',
...

instead of the empty string first argument to patterns that you show?

On 2/13/12, Bob Carlson <[email protected]> wrote:
> I'm now on the 1.2 tutorial, but a similar error message is coming up. The
> urls.py file is
>
> from django.conf.urls.defaults import *
> from polls.models import Poll
>
> info_dict = {
>     'queryset': Poll.objects.all(),
> }
>
> urlpatterns = patterns('',
>     (r'^$', 'django.views.generic.list_detail.object_list', info_dict),
>     ....
>
> The error message is
> ViewDoesNotExist at /polls/
> Could not import polls.views.django.views.generic.list_detail. Error was: No
> module named django.views.generic.list_detail
>
> List_detail is clearly there in the django/generic folder.
>
> Cheers, Bob
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On
> Behalf Of Brett Epps
> Sent: Monday, February 13, 2012 10:12
> To: [email protected]
> Subject: Re: Django setup on Win7 - can't import some things
>
> Hi Bob,
>
> It sounds like you're using the 1.3 or later version of the tutorial.
> Class-based generic views were added in 1.3.  Try this link for the correct
> version:
>
> https://docs.djangoproject.com/en/1.2/intro/tutorial01/
>
> (Note the 1.2 in the URL.)
>
> Hope that helps,
>
> Brett
>
>
> On 2/13/12 10:35 AM, "LostInTheTrees" <[email protected]> wrote:
>
>>I am trying to get started with Django and having some trouble. I'm
>>using Django 1.2 to reserve the ability to go to Google's app engine if
>>I want. I have python 2.7 installed and working on Win7. I unstalled
>>Django 1.2 using the install script and it copied Django into the
>>site-packages directory.
>>
>>I have been working through the tutorial and am just about finished.
>>However, in the last step, the tutorial uses generic views. When I run
>>it, I get "cannot import name DetailView". The import command, straight
>>from the tutorial is "from django.views.generic import DetailView,
>>ListView".
>>
>>Early on, I could not execute django-admin.py. I had already installed
>>PIL and I had read about *.pth files in .../site-packages/*. So I
>>created a file django.pth. In it I put the single line "django\bin".
>>After this, django-admin.py could be easily executed.
>>
>>Do I have to add more lines to django.pth? Is there something else I
>>missed?
>>
>>-Bob
>>
>>--
>>You received this message because you are subscribed to the Google
>>Groups "Django users" group.
>>To post to this group, send email to [email protected].
>>To unsubscribe from this group, send email to
>>[email protected].
>>For more options, visit this group at
>>http://groups.google.com/group/django-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to