diff --git a/django/views/defaults.py b/django/views/defaults.py index 953cad9122..107d6f4fb1 100644 --- a/django/views/defaults.py +++ b/django/views/defaults.py @@ -8,7 +8,7 @@ def shortcut(request, content_type_id, object_id): "Redirect to an object's page based on a content-type ID and an object ID." # Look up the object, making sure it's got a get_absolute_url() function. try: - content_type = ContentType.objects.get_object(pk=content_type_id) + content_type = ContentType.objects.get(pk=content_type_id) obj = content_type.get_object_for_this_type(pk=object_id) except ObjectDoesNotExist: raise http.Http404, "Content type %s object %s doesn't exist" % (content_type_id, object_id) diff --git a/django/views/generic/create_update.py b/django/views/generic/create_update.py index f1baa96bb9..2d260c5cf7 100644 --- a/django/views/generic/create_update.py +++ b/django/views/generic/create_update.py @@ -171,7 +171,7 @@ def delete_object(request, model, post_delete_redirect, raise AttributeError("Generic delete view must be called with either an object_id or a slug/slug_field") lookup_kwargs.update(extra_lookup_kwargs) try: - object = model._default_manager.get_object(**lookup_kwargs) + object = model._default_manager.get(**lookup_kwargs) except ObjectDoesNotExist: raise Http404, "No %s found for %s" % (model._meta.app_label, lookup_kwargs) diff --git a/django/views/registration/passwords.py b/django/views/registration/passwords.py index 6379000587..9f65a3518d 100644 --- a/django/views/registration/passwords.py +++ b/django/views/registration/passwords.py @@ -18,7 +18,7 @@ class PasswordResetForm(forms.Manipulator): def isValidUserEmail(self, new_data, all_data): "Validates that a user exists with the given e-mail address" try: - self.user_cache = User.objects.get_object(email__iexact=new_data) + self.user_cache = User.objects.get(email__iexact=new_data) except User.DoesNotExist: raise validators.ValidationError, "That e-mail address doesn't have an associated user acount. Are you sure you've registered?"