Ticket #1447: genericviews.diff

File genericviews.diff, 2.1 KB (added by russell@…, 19 years ago)

The Patch

  • django/views/registration/passwords.py

     
    1818    def isValidUserEmail(self, new_data, all_data):
    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?"
    2424
  • django/views/generic/create_update.py

     
    171171        raise AttributeError("Generic delete view must be called with either an object_id or a slug/slug_field")
    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)
    177177
  • django/views/defaults.py

     
    88    "Redirect to an object's page based on a content-type ID and an object ID."
    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:
    1414        raise http.Http404, "Content type %s object %s doesn't exist" % (content_type_id, object_id)
Back to Top