Tutorial 4 Unneeded Import
|Reported by:||Owned by:||Jacob|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The current version (SVN Revision 2766) of Tutorial 4 in the "docs/" folder has an unneeded and possibly confusing import. The importing of Http404 from a previous example is still taking place, even though all the code that was using it in earlier examples has been updated to use the shortcut "get_object_or_404".
So let's create a ``vote()`` function in ``mysite/polls/views.py``:: from django.shortcuts import get_object_or_404, render_to_response from django.http import Http404,HttpResponseRedirect