Author: jezdez
Date: 2011-07-29 02:39:35 -0700 (Fri, 29 Jul 2011)
New Revision: 16557

Modified:
   django/trunk/django/contrib/gis/db/backends/base.py
   django/trunk/django/db/models/fields/__init__.py
   django/trunk/django/views/debug.py
   django/trunk/django/views/generic/dates.py
Log:
Fixed #16531 -- Fixed various instances of "undefined name" issues. Thanks, 
Bruno Reni?\195?\169.

Modified: django/trunk/django/contrib/gis/db/backends/base.py
===================================================================
--- django/trunk/django/contrib/gis/db/backends/base.py 2011-07-29 09:39:23 UTC 
(rev 16556)
+++ django/trunk/django/contrib/gis/db/backends/base.py 2011-07-29 09:39:35 UTC 
(rev 16557)
@@ -121,7 +121,7 @@
         raise NotImplementedError('Aggregate support not implemented for this 
spatial backend.')
 
     def spatial_lookup_sql(self, lvalue, lookup_type, value, field):
-        raise NotImplmentedError
+        raise NotImplementedError
 
     # Routines for getting the OGC-compliant models.
     def geometry_columns(self):

Modified: django/trunk/django/db/models/fields/__init__.py
===================================================================
--- django/trunk/django/db/models/fields/__init__.py    2011-07-29 09:39:23 UTC 
(rev 16556)
+++ django/trunk/django/db/models/fields/__init__.py    2011-07-29 09:39:35 UTC 
(rev 16557)
@@ -967,7 +967,7 @@
         if value and ':' in value:
             try:
                 return clean_ipv6_address(value, self.unpack_ipv4)
-            except ValidationError:
+            except exceptions.ValidationError:
                 pass
         return value
 

Modified: django/trunk/django/views/debug.py
===================================================================
--- django/trunk/django/views/debug.py  2011-07-29 09:39:23 UTC (rev 16556)
+++ django/trunk/django/views/debug.py  2011-07-29 09:39:35 UTC (rev 16557)
@@ -5,6 +5,7 @@
 import types
 
 from django.conf import settings
+from django.core.exceptions import ImproperlyConfigured
 from django.http import (HttpResponse, HttpResponseServerError,
     HttpResponseNotFound, HttpRequest, build_request_repr)
 from django.template import (Template, Context, TemplateDoesNotExist,
@@ -79,7 +80,7 @@
         try:
             default_exception_reporter_filter = getattr(mod, classname)()
         except AttributeError:
-            raise exceptions.ImproperlyConfigured('Default exception reporter 
filter module "%s" does not define a "%s" class' % (modname, classname))
+            raise ImproperlyConfigured('Default exception reporter filter 
module "%s" does not define a "%s" class' % (modname, classname))
     if request:
         return getattr(request, 'exception_reporter_filter', 
default_exception_reporter_filter)
     else:

Modified: django/trunk/django/views/generic/dates.py
===================================================================
--- django/trunk/django/views/generic/dates.py  2011-07-29 09:39:23 UTC (rev 
16556)
+++ django/trunk/django/views/generic/dates.py  2011-07-29 09:39:35 UTC (rev 
16557)
@@ -210,9 +210,9 @@
 
         date_list = queryset.dates(date_field, date_type)[::-1]
         if date_list is not None and not date_list and not allow_empty:
-            raise Http404(_(u"No %(verbose_name_plural)s available") % {
-                    'verbose_name_plural': 
force_unicode(qs.model._meta.verbose_name_plural)
-            })
+            name = force_unicode(queryset.model._meta.verbose_name_plural)
+            raise Http404(_(u"No %(verbose_name_plural)s available") %
+                          {'verbose_name_plural': name})
 
         return date_list
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to