Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Stuck on "ViewDoesNotExist" last step of tutorial part 4

Received: by 10.236.156.68 with SMTP id l44mr1719057yhk.82.1308366871463;
        Fri, 17 Jun 2011 20:14:31 -0700 (PDT)
X-BeenThere: django-users@googlegroups.com
Received: by 10.150.101.19 with SMTP id y19ls3324051ybb.5.gmail; Fri, 17 Jun
 2011 20:13:57 -0700 (PDT)
Received: by 10.236.27.74 with SMTP id d50mr1667040yha.13.1308366837764;
        Fri, 17 Jun 2011 20:13:57 -0700 (PDT)
Received: by 10.151.1.41 with SMTP id d41msybi;
        Fri, 17 Jun 2011 18:50:56 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.11.11 with SMTP id 11mr432446wfk.18.1308361856349; Fri, 17
 Jun 2011 18:50:56 -0700 (PDT)
Received: by p9g2000prh.googlegroups.com with HTTP; Fri, 17 Jun 2011 18:50:56
 -0700 (PDT)
Date: Fri, 17 Jun 2011 18:50:56 -0700 (PDT)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17)
 Gecko/20110420 Firefox/3.6.17,gzip(gfe)
Message-ID: <0f03cbc0-d229-4759-901f-381138487d75@p9g2000prh.googlegroups.com>
Subject: Stuck on "ViewDoesNotExist" last step of tutorial part 4
From: TuckFrance <aidanai...@gmail.com>
To: Django users <django-users@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

I am using Django 1.3 with SQlite. I got through the entire tutorial
except the last step of part 4.

It says "You can now delete the index(), detail() and results() views
from polls/views.py. We don't need them anymore -- they have been
replaced by generic views."

However when I do this I get the following error:

Environment:


Request Method: POST
Request URL: http://localhost:8000/polls/1/vote/

Django Version: 1.3
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'polls',
 'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "c:\Python27\lib\site-packages\django\core\handlers\base.py" in
get_response
  111.                         response = callback(request,
*callback_args, **callback_kwargs)
File "C:\Documents and Settings\ask\Desktop\Stream Coding Project
\Django First Tutorial\mysite\polls\views.py" in vote
  24.         return HttpResponseRedirect(reverse('poll_results',
args=(p.id,)))
File "c:\Python27\lib\site-packages\django\core\urlresolvers.py" in
reverse
  391.             *args, **kwargs)))
File "c:\Python27\lib\site-packages\django\core\urlresolvers.py" in
reverse
  312.         possibilities = self.reverse_dict.getlist(lookup_view)
File "c:\Python27\lib\site-packages\django\core\urlresolvers.py" in
_get_reverse_dict
  229.             self._populate()
File "c:\Python27\lib\site-packages\django\core\urlresolvers.py" in
_populate
  220.                 lookups.appendlist(pattern.callback, (bits,
p_pattern))
File "c:\Python27\lib\site-packages\django\core\urlresolvers.py" in
_get_callback
  170.             raise ViewDoesNotExist("Tried %s in module %s.
Error was: %s" % (func_name, mod_name, str(e)))

Exception Type: ViewDoesNotExist at /polls/1/vote/
Exception Value: Tried results in module polls.views. Error was:
'module' object has no attribute 'results'