Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

magic-removal: Fixed #1447 -- More old-style DB API fixes. Thanks, ru…

…ssell@hbd

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 650b042001638ae1d0c06f2c2af0ce708789d1b8 1 parent 85f7fba
Adrian Holovaty adrianholovaty authored
2  django/views/defaults.py
View
@@ -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)
2  django/views/generic/create_update.py
View
@@ -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)
2  django/views/registration/passwords.py
View
@@ -18,7 +18,7 @@ def __init__(self):
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?"
Please sign in to comment.
Something went wrong with that request. Please try again.