The view function may have been deleted but the urls.py file (in the root of 
your project) is still (probably) referring to those functions. So look at your 
urls.py file and you'll figure it out!

Good luck!

> 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'
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 


Jonas Geiregat
jo...@geiregat.org





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

Reply via email to