Django

Code

Ticket #1710 (closed: fixed)

Opened 3 years ago

Last modified 3 years ago

Tutorial 4 Unneeded Import

Reported by: polarcowz@gmail.com Assigned to: jacob
Milestone: Component: Documentation
Version: magic-removal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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

Attachments

Change History

04/30/06 23:48:50 changed by polarcowz@gmail.com

  • status changed from new to closed.
  • resolution set to fixed.

This appears to be fixed as of the latest Subversion release (2799). I am closing the ticket as a result.


Add/Change #1710 (Tutorial 4 Unneeded Import)




Change Properties
Action