Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored March 02, 2006
2  django/views/defaults.py
@@ -8,7 +8,7 @@ def shortcut(request, content_type_id, object_id):
8 8
     "Redirect to an object's page based on a content-type ID and an object ID."
9 9
     # Look up the object, making sure it's got a get_absolute_url() function.
10 10
     try:
11  
-        content_type = ContentType.objects.get_object(pk=content_type_id)
  11
+        content_type = ContentType.objects.get(pk=content_type_id)
12 12
         obj = content_type.get_object_for_this_type(pk=object_id)
13 13
     except ObjectDoesNotExist:
14 14
         raise http.Http404, "Content type %s object %s doesn't exist" % (content_type_id, object_id)
2  django/views/generic/create_update.py
@@ -171,7 +171,7 @@ def delete_object(request, model, post_delete_redirect,
171 171
         raise AttributeError("Generic delete view must be called with either an object_id or a slug/slug_field")
172 172
     lookup_kwargs.update(extra_lookup_kwargs)
173 173
     try:
174  
-        object = model._default_manager.get_object(**lookup_kwargs)
  174
+        object = model._default_manager.get(**lookup_kwargs)
175 175
     except ObjectDoesNotExist:
176 176
         raise Http404, "No %s found for %s" % (model._meta.app_label, lookup_kwargs)
177 177
 
2  django/views/registration/passwords.py
@@ -18,7 +18,7 @@ def __init__(self):
18 18
     def isValidUserEmail(self, new_data, all_data):
19 19
         "Validates that a user exists with the given e-mail address"
20 20
         try:
21  
-            self.user_cache = User.objects.get_object(email__iexact=new_data)
  21
+            self.user_cache = User.objects.get(email__iexact=new_data)
22 22
         except User.DoesNotExist:
23 23
             raise validators.ValidationError, "That e-mail address doesn't have an associated user acount. Are you sure you've registered?"
24 24
 

0 notes on commit 650b042

Please sign in to comment.
Something went wrong with that request. Please try again.