Django

Code

Changeset 2475

Show
Ignore:
Timestamp:
03/02/06 09:49:30 (3 years ago)
Author:
adrian
Message:

magic-removal: Fixed #1447 -- More old-style DB API fixes. Thanks, russell@hbd

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/views/defaults.py

    r1945 r2475  
    99    # Look up the object, making sure it's got a get_absolute_url() function. 
    1010    try: 
    11         content_type = ContentType.objects.get_object(pk=content_type_id) 
     11        content_type = ContentType.objects.get(pk=content_type_id) 
    1212        obj = content_type.get_object_for_this_type(pk=object_id) 
    1313    except ObjectDoesNotExist: 
  • django/branches/magic-removal/django/views/generic/create_update.py

    r2455 r2475  
    172172    lookup_kwargs.update(extra_lookup_kwargs) 
    173173    try: 
    174         object = model._default_manager.get_object(**lookup_kwargs) 
     174        object = model._default_manager.get(**lookup_kwargs) 
    175175    except ObjectDoesNotExist: 
    176176        raise Http404, "No %s found for %s" % (model._meta.app_label, lookup_kwargs) 
  • django/branches/magic-removal/django/views/registration/passwords.py

    r2050 r2475  
    1919        "Validates that a user exists with the given e-mail address" 
    2020        try: 
    21             self.user_cache = User.objects.get_object(email__iexact=new_data) 
     21            self.user_cache = User.objects.get(email__iexact=new_data) 
    2222        except User.DoesNotExist: 
    2323            raise validators.ValidationError, "That e-mail address doesn't have an associated user acount. Are you sure you've registered?"