~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to django/contrib/contenttypes/views.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-05-21 07:52:55 UTC
  • mfrom: (1.3.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20100521075255-ii78v1dyfmyu3uzx
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    try:
10
10
        content_type = ContentType.objects.get(pk=content_type_id)
11
11
        obj = content_type.get_object_for_this_type(pk=object_id)
12
 
    except ObjectDoesNotExist:
 
12
    except (ObjectDoesNotExist, ValueError):
13
13
        raise http.Http404("Content type %s object %s doesn't exist" % (content_type_id, object_id))
14
14
    try:
15
15
        absurl = obj.get_absolute_url()