Ticket #1447: genericviews.diff
File genericviews.diff, 2.1 KB (added by , 19 years ago) |
---|
-
django/views/registration/passwords.py
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 -
django/views/generic/create_update.py
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 -
django/views/defaults.py
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)