Author: jbronn
Date: 2008-07-08 13:46:09 -0500 (Tue, 08 Jul 2008)
New Revision: 7870

Modified:
   django/branches/gis/django/contrib/gis/db/backend/oracle/query.py
   django/branches/gis/django/contrib/gis/db/models/sql/query.py
Log:
gis: Fixed bug in `GeoQuery.get_default_columns`; forgot to make Oracle spatial 
lookup terms structure a dictionary.


Modified: django/branches/gis/django/contrib/gis/db/backend/oracle/query.py
===================================================================
--- django/branches/gis/django/contrib/gis/db/backend/oracle/query.py   
2008-07-08 05:29:23 UTC (rev 7869)
+++ django/branches/gis/django/contrib/gis/db/backend/oracle/query.py   
2008-07-08 18:46:09 UTC (rev 7870)
@@ -104,10 +104,10 @@
 # This lookup type does not require a mapping.
 MISC_TERMS = ['isnull']
 
-# Assacceptable lookup types for Oracle spatial.
+# Acceptable lookup types for Oracle spatial.
 ORACLE_SPATIAL_TERMS  = ORACLE_GEOMETRY_FUNCTIONS.keys()
 ORACLE_SPATIAL_TERMS += MISC_TERMS
-ORACLE_SPATIAL_TERMS = tuple(ORACLE_SPATIAL_TERMS) # Making immutable
+ORACLE_SPATIAL_TERMS = dict((term, None) for term in ORACLE_SPATIAL_TERMS) # 
Making dictionary for fast lookups
 
 #### The `get_geo_where_clause` function for Oracle ####
 def get_geo_where_clause(table_alias, name, lookup_type, geo_annot):

Modified: django/branches/gis/django/contrib/gis/db/models/sql/query.py
===================================================================
--- django/branches/gis/django/contrib/gis/db/models/sql/query.py       
2008-07-08 05:29:23 UTC (rev 7869)
+++ django/branches/gis/django/contrib/gis/db/models/sql/query.py       
2008-07-08 18:46:09 UTC (rev 7870)
@@ -10,7 +10,7 @@
 
 # Valid GIS query types.
 ALL_TERMS = sql.constants.QUERY_TERMS.copy()
-ALL_TERMS.update(dict([(term, None) for term in SpatialBackend.gis_terms]))
+ALL_TERMS.update(SpatialBackend.gis_terms)
 
 class GeoQuery(sql.Query):
     """
@@ -125,7 +125,7 @@
         root_pk = self.model._meta.pk.column
         seen = {None: table_alias}
         aliases = set()
-        for field, model in self.model._meta.get_fields_with_model():
+        for field, model in opts.get_fields_with_model():
             try:
                 alias = seen[model]
             except KeyError:


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

Reply via email to